Submission #55242
ソースコード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | #include<bits/stdc++.h> using namespace std; #define int long long #define mod 1000000007 #define INF 2147483647 #define fi first #define se second int abs ( int a, int b){ int c=max(a,b)-min(a,b); return c; } signed main(){ cin.tie(0); ios::sync_with_stdio( false ); int a; cin>>a; for ( int i=0;i<a;i++){ for ( int j=0;j<a;j++){ if (i==0||i==a-1||j==0||j==a-1) cout<< " *" ; else cout<< " " ; } cout<< "\n" ; } } |
ステータス
項目 | データ |
---|---|
問題 | 0378 - 正方形の描写 |
ユーザー名 | ei1941 |
投稿日時 | 2019-09-27 16:17:44 |
言語 | C++11 |
状態 | Accepted |
得点 | 1 |
ソースコード長 | 464 Byte |
最大実行時間 | 31 ms |
最大メモリ使用量 | 692 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 1 / 1 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
input1.txt | AC | 31 ms | 604 KB |
1
|
input2.txt | AC | 24 ms | 692 KB |
1
|
input3.txt | AC | 27 ms | 520 KB |
1
|
input4.txt | AC | 20 ms | 600 KB |
1
|