Submission
Status:
PPPPPPPPPPP
Score: 100
User: Asphyrv
Problemset: ฝุ่นธุลีล้อมดาว
Language: cpp
Time: 0.046 second
Submitted On: 2024-10-18 00:59:00
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
cin.tie(NULL)->ios_base::sync_with_stdio(false);
int e;
cin >> e;
for(int i=0; i<2*e-1; i++){
for(int j=0; j<2*e-1; j++){
if(i == e - 1 && j == e - 1){
cout << '*';
}else if(i + j >= e - 1 && i + j <= 3 * (e - 1) && abs(i - j) <= e - 1){
cout << '+';
}else{
cout << '-';
}
}
cout << '\n';
}
return 0;
}
/*
2: 1, 3
3: 2, 6
4: 3, 9
*/