結果

問題 No.1004 サイコロの実装 (2)
ユーザー shamioshamio
提出日時 2020-06-27 09:16:37
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 293 bytes
コンパイル時間 1,345 ms
コンパイル使用メモリ 86,652 KB
実行使用メモリ 81,164 KB
最終ジャッジ日時 2023-09-18 19:05:30
合計ジャッジ時間 7,654 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
75,484 KB
testcase_01 AC 75 ms
71,208 KB
testcase_02 AC 74 ms
71,184 KB
testcase_03 AC 76 ms
71,112 KB
testcase_04 AC 75 ms
71,136 KB
testcase_05 AC 76 ms
70,700 KB
testcase_06 AC 76 ms
71,144 KB
testcase_07 AC 76 ms
71,020 KB
testcase_08 AC 75 ms
70,956 KB
testcase_09 AC 77 ms
71,200 KB
testcase_10 AC 76 ms
70,840 KB
testcase_11 AC 76 ms
71,256 KB
testcase_12 AC 76 ms
71,216 KB
testcase_13 AC 75 ms
70,956 KB
testcase_14 AC 75 ms
71,336 KB
testcase_15 AC 77 ms
70,832 KB
testcase_16 AC 84 ms
75,960 KB
testcase_17 AC 80 ms
75,956 KB
testcase_18 AC 80 ms
75,980 KB
testcase_19 AC 82 ms
75,996 KB
testcase_20 AC 81 ms
75,936 KB
testcase_21 AC 88 ms
75,996 KB
testcase_22 AC 82 ms
75,828 KB
testcase_23 AC 81 ms
75,960 KB
testcase_24 AC 88 ms
76,048 KB
testcase_25 AC 85 ms
76,048 KB
testcase_26 TLE -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

a, b, x0, n = map(int, input().split())
m = pow(2, 32)

x = x0
stones = [[0, 0], [0, 0]]
now = [0, 0]
for i in range(2 * n):
    turn = i % 2
    x = (a * x + b) % m
    dice = x % 6 + 1
    now[turn] += dice
    now[turn] %= 2
    stones[turn][now[turn]] += 1

print(*list(map(min, stones)))
0