Submission #62699
ソースコード
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 | #include<iostream> #include<vector> #include<cmath> #include<algorithm> using namespace std; int main(){ cin.tie(nullptr); ios_base::sync_with_stdio( false ); int n; cin>>n; if (n==1){ cout<< " *" << "\n" ; return 0; } for ( int i=1;i<=n;i++){ for ( int j=1;j<=n;j++){ if (i==1||i==n||j==1||j==n){ cout<< " *" ; } else { cout<< " " ; } if (j==n){ cout<< "\n" ; } } } return 0; } |
ステータス
項目 | データ |
---|---|
問題 | 0378 - 正方形の描写 |
ユーザー名 | ei2005 |
投稿日時 | 2020-08-20 12:45:57 |
言語 | C++14 |
状態 | Accepted |
得点 | 1 |
ソースコード長 | 589 Byte |
最大実行時間 | 26 ms |
最大メモリ使用量 | 684 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 1 / 1 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
input1.txt | AC | 22 ms | 604 KB |
1
|
input2.txt | AC | 17 ms | 684 KB |
1
|
input3.txt | AC | 26 ms | 512 KB |
1
|
input4.txt | AC | 15 ms | 464 KB |
1
|