結果

問題 No.1399 すごろくで世界旅行 (構築)
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2021-02-19 21:49:11
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 257 bytes
コンパイル時間 2,510 ms
コンパイル使用メモリ 86,712 KB
実行使用メモリ 90,676 KB
最終ジャッジ日時 2023-10-15 00:50:46
合計ジャッジ時間 25,672 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,184 KB
testcase_01 WA -
testcase_02 AC 73 ms
71,384 KB
testcase_03 AC 72 ms
71,100 KB
testcase_04 AC 73 ms
71,148 KB
testcase_05 WA -
testcase_06 AC 73 ms
71,288 KB
testcase_07 AC 78 ms
71,132 KB
testcase_08 AC 73 ms
71,372 KB
testcase_09 WA -
testcase_10 AC 73 ms
71,136 KB
testcase_11 AC 72 ms
71,368 KB
testcase_12 AC 73 ms
71,224 KB
testcase_13 WA -
testcase_14 AC 75 ms
71,384 KB
testcase_15 AC 74 ms
71,236 KB
testcase_16 AC 76 ms
71,048 KB
testcase_17 AC 278 ms
90,420 KB
testcase_18 AC 183 ms
90,572 KB
testcase_19 AC 179 ms
90,328 KB
testcase_20 AC 178 ms
90,416 KB
testcase_21 AC 180 ms
90,260 KB
testcase_22 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

v,d = map(int,input().split())
if d == 1:
    ans = [[1]*v for i in range(v)]
    for i in range(v):
        ans[i][i] = 0
else:
    ans = [[0]*v for i in range(v)]
    for i in range(v):
        ans[i][0] = ans[0][i] = 1

for i in ans:
    print(*i,sep="")
0