結果

問題 No.1399 すごろくで世界旅行 (構築)
ユーザー KudeKude
提出日時 2021-02-19 22:17:12
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 313 bytes
コンパイル時間 420 ms
コンパイル使用メモリ 87,160 KB
実行使用メモリ 91,288 KB
最終ジャッジ日時 2023-10-15 02:26:20
合計ジャッジ時間 20,953 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 69 ms
71,068 KB
testcase_02 AC 69 ms
71,400 KB
testcase_03 AC 67 ms
71,420 KB
testcase_04 AC 69 ms
71,184 KB
testcase_05 AC 68 ms
70,932 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 70 ms
71,188 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 72 ms
71,148 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 144 ms
88,776 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

v, d = map(int, input().split())
e = [[0] * v for _ in range(v)]
# k^d >= v
k = 1
if d > 30:
    k = 2
else:
    while k ** d < v:
        k += 1

for i in range(v):
    s = k * i
    for j in range(k):
        nj = (s + j) % v
        e[i][nj] = 1
for t in e:
    for x in t:
        print(x, end='')
    print()
0