結果
| 問題 |
No.1004 サイコロの実装 (2)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-06-27 09:16:37 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 293 bytes |
| コンパイル時間 | 368 ms |
| コンパイル使用メモリ | 82,432 KB |
| 実行使用メモリ | 80,640 KB |
| 最終ジャッジ日時 | 2024-07-05 08:53:12 |
| 合計ジャッジ時間 | 5,151 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 24 TLE * 1 -- * 13 |
ソースコード
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)))