Submission #36369
ソースコード
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 32 33 34 35 36 37 38 | #include<stdio.h> #include<math.h> #include<string.h> int main(){ int n; scanf ( "%d" , &n); int i = 0; while (i < n){ int j = 0; while (j < n){ if (n > 2){ if (j == 0 || j == (n - 1)){ printf ( " *" ); } else if (i != 0 && i !=( n - 1)){ printf ( " " ); } else { printf ( " *" ); } } else { printf ( " *" ); } j++; } i++; printf ( "\n" ); } return 0; } |
ステータス
項目 | データ |
---|---|
問題 | 0378 - 正方形の描写 |
ユーザー名 | r1825 |
投稿日時 | 2018-05-29 16:21:02 |
言語 | C |
状態 | Accepted |
得点 | 1 |
ソースコード長 | 540 Byte |
最大実行時間 | 41 ms |
最大メモリ使用量 | 408 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 1 / 1 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
input1.txt | AC | 41 ms | 380 KB |
1
|
input2.txt | AC | 25 ms | 408 KB |
1
|
input3.txt | AC | 20 ms | 372 KB |
1
|
input4.txt | AC | 24 ms | 300 KB |
1
|