結果
| 問題 |
No.1004 サイコロの実装 (2)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-03-18 12:32:22 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 501 bytes |
| コンパイル時間 | 724 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 1,397,376 KB |
| 最終ジャッジ日時 | 2024-12-14 01:42:38 |
| 合計ジャッジ時間 | 41,536 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 MLE * 1 |
| other | AC * 19 TLE * 2 MLE * 17 |
ソースコード
a, b, x0, N = map(int, input().split(' '))
MOD=2**32
x=[x0]
for n in range(N*2):
x.append(x[n]*a+b)
x=[(n%6)+1 for n in x]
x.pop(0)
if N==0:
print('0 0')
exit()
turn = 0
score=[[0,0],[0,0]]
position=[0,0]
for value in x:
position[turn]+=value
if position[turn]%2==1:
score[turn][0]+=1
else:
score[turn][1]+=1
turn = (turn+1) % 2
#print(score)
#print(position)
a_score = min(score[0])
b_score = min(score[1])
print(str(a_score)+' '+str(b_score))