結果
| 問題 | No.1004 サイコロの実装 (2) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-06-27 09:14:38 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 293 bytes |
| 記録 | |
| コンパイル時間 | 371 ms |
| コンパイル使用メモリ | 20,956 KB |
| 実行使用メモリ | 21,500 KB |
| 最終ジャッジ日時 | 2026-03-26 15:58:02 |
| 合計ジャッジ時間 | 7,161 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)))