結果
問題 | No.1587 012 Matrix |
ユーザー |
![]() |
提出日時 | 2021-07-08 22:32:00 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 16 ms / 1,000 ms |
コード長 | 355 bytes |
コンパイル時間 | 1,525 ms |
コンパイル使用メモリ | 166,628 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-01 12:50:53 |
合計ジャッジ時間 | 2,708 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 22 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ int N; cin >> N; for (int i = 0; i < N; i++){ for (int j = 0; j < N; j++){ if (i + j < N - 1){ cout << 2; } else if (i + j > N - 1){ cout << 0; } else if (i < j){ cout << 2; } else { cout << 1; } } cout << endl; } }