結果
| 問題 | 
                            No.1004 サイコロの実装 (2)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2020-06-27 09:24:37 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                TLE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 298 bytes | 
| コンパイル時間 | 79 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 50,644 KB | 
| 最終ジャッジ日時 | 2024-07-05 08:53:51 | 
| 合計ジャッジ時間 | 21,672 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 24 TLE * 1 -- * 13 | 
ソースコード
import numpy as np
a, b, x0, n = map(np.uint32, input().split())
x = x0
stones = [[0, 0], [0, 0]]
now = [0, 0]
for i in range(2 * n):
    turn = i % 2
    x = a * x + b
    dice = x % 6 + 1
    now[turn] += dice
    now[turn] %= 2
    stones[turn][now[turn]] += 1
print(*list(map(min, stones)))