結果
| 問題 |
No.1587 012 Matrix
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-07-09 00:14:14 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 14 ms / 1,000 ms |
| コード長 | 545 bytes |
| コンパイル時間 | 1,522 ms |
| コンパイル使用メモリ | 166,708 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-01 13:26:37 |
| 合計ジャッジ時間 | 2,651 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 22 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(false);
int N;cin>>N;
int a=0,b=9;
for(int i=1;i<=N;i++){
for(int j=1;j<=N;j++){
if(i==j){
if(i%2==1){
cout<<1;
}else{
cout<<2;
}
}else{
if(j<=i){
cout<<2;
}else{
cout<<0;
}
}
}
cout<<endl;
}
return 0;
}