結果
問題 |
No.1004 サイコロの実装 (2)
|
ユーザー |
|
提出日時 | 2020-03-29 12:11:24 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 34 ms / 2,000 ms |
コード長 | 491 bytes |
コンパイル時間 | 430 ms |
コンパイル使用メモリ | 12,288 KB |
実行使用メモリ | 10,496 KB |
最終ジャッジ日時 | 2025-01-02 13:18:48 |
合計ジャッジ時間 | 3,022 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 38 |
ソースコード
a, b, x, n = [int(w) for w in input().split()] m = 2 ** 32 # p1 = [[0, 0], 0] # p2 = [[0, 0], 0] # is_turn_1 = True # def turn(player, dice): # player[1] += dice % 6 + 1 # player[0][player[1] % 2] += 1 # for i in range(n*2): # x = (a * x + b) % m # # print(x, x % 6+1) # if is_turn_1: # turn(p1, x) # else: # turn(p2, x) # is_turn_1 = not is_turn_1 # print(min(p1[0]), min(p2[0])) if x % 2: print(n // 2, 0) else: print(0, n // 2)