Submission #55221


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include<bits/stdc++.h>
#define INF 2147483647
#define inf 1000000007
#define SYOU(x) setprecision(x)
#define abs(x,y) (max(x,y)-min(x,y))
#define mp make_pair
#define fi first
#define se second
using namespace std;
int i[111111];
vector<int> ii;
signed main(){
cin.tie(0);
ios::sync_with_stdio(false);
long long a,b,c,d=1,e=0,f=0,g=0,h,j;
cin >>a;
for(int n=0;n<a;n++)cout <<" *";
cout <<'\n';
for(int n=1;n<a-1;n++){
for(int m=0;m<a;m++){
if(m==0||m==a-1) cout <<" *";
else cout <<" ";
}
cout <<'\n';
}
if(a!=1){
for(int n=0;n<a;n++) cout <<" *";
cout <<'\n';
}
return (0);
}

ステータス

項目 データ
問題 0378 - 正方形の描写
ユーザー名 ei1923
投稿日時 2019-09-27 12:28:07
言語 C++14
状態 Accepted
得点 1
ソースコード長 664 Byte
最大実行時間 29 ms
最大メモリ使用量 684 KB

セット

セット 得点 Cases
1 ALL 1 / 1 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
input1.txt AC 23 ms 604 KB
1
input2.txt AC 29 ms 684 KB
1
input3.txt AC 25 ms 640 KB
1
input4.txt AC 21 ms 596 KB
1