結果
| 問題 |
No.1587 012 Matrix
|
| コンテスト | |
| ユーザー |
trineutron
|
| 提出日時 | 2021-07-08 22:33:25 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 17 ms / 1,000 ms |
| コード長 | 485 bytes |
| コンパイル時間 | 2,252 ms |
| コンパイル使用メモリ | 193,056 KB |
| 最終ジャッジ日時 | 2025-01-22 18:41:27 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)
{
cout << 2;
}
else if (i >= n / 2 and i + j == n - 1)
{
cout << 1;
}
else
{
cout << 0;
}
}
cout << endl;
}
return 0;
}
trineutron