結果
| 問題 |
No.1004 サイコロの実装 (2)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-03-29 11:29:20 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 350 bytes |
| コンパイル時間 | 291 ms |
| コンパイル使用メモリ | 12,032 KB |
| 実行使用メモリ | 20,608 KB |
| 最終ジャッジ日時 | 2025-01-02 13:14:57 |
| 合計ジャッジ時間 | 44,506 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 12 WA * 12 TLE * 14 |
ソースコード
a, b, x, n = [int(w) for w in input().split()]
m = 2 ** 32
p1 = [0, 0]
p2 = [0, 0]
pos1 = 0
pos2 = 0
is_turn_1 = True
def turn(player, dice, pos):
pos += dice % 6 + 1
player[pos % 2] += 1
for i in range(n):
x = (a * x + b) % m
if is_turn_1:
turn(p1, x, pos1)
else:
turn(p2, x, pos2)
print(min(p1), min(p2))