結果
問題 |
No.1004 サイコロの実装 (2)
|
ユーザー |
|
提出日時 | 2020-03-06 22:28:45 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 258 bytes |
コンパイル時間 | 125 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 16,000 KB |
最終ジャッジ日時 | 2024-10-14 08:06:37 |
合計ジャッジ時間 | 4,990 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 12 WA * 12 TLE * 1 -- * 13 |
ソースコード
a,b,x,N = map(int,input().split(" ")) m = 2**32 now1 = 0 now2 = 0 c=[0,0] d = [0,0] for i in range(N): x = ((a*x+b)%m)%6+1 if i %2 == 0: now1 += x c[now1%2] += 1 else: now2 += x c[now2%2] += 1 print(min(c),min(d))