結果
| 問題 | No.1004 サイコロの実装 (2) |
| コンテスト | |
| ユーザー |
yuya
|
| 提出日時 | 2020-03-06 21:44:29 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 695 bytes |
| 記録 | |
| コンパイル時間 | 142 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 16,684 KB |
| 最終ジャッジ日時 | 2024-10-14 05:02:33 |
| 合計ジャッジ時間 | 2,919 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 6 WA * 18 RE * 14 |
ソースコード
mod = int(4294967296)
a, b, x, n = map(int, input().split())
listlist = [0] * (n*2)
for i in range(0, len(listlist)):
tmp = (a * x) % mod
tmp = (tmp + b) % mod
x = tmp
listlist[i] = tmp
taka = []
aoki = []
for i in range(len(listlist)):
flag = True
if listlist[i] % 2 == 0:
flag = True
else:
flag = False
if i % 2 == 0:
if flag:
taka.append(1)
else:
taka.append(0)
else:
if flag:
aoki.append(1)
else:
aoki.append(0)
takacount = str(min(taka.count(1), taka.count(0)))
aoki = str(min(aoki.count(1), aoki.count(0)))
print(takacount + ' ' + aoki)
yuya