結果
問題 |
No.769 UNOシミュレータ
|
ユーザー |
|
提出日時 | 2022-01-19 20:26:29 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 537 bytes |
コンパイル時間 | 627 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 77,696 KB |
最終ジャッジ日時 | 2024-11-23 14:01:51 |
合計ジャッジ時間 | 4,148 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 17 WA * 6 |
ソースコード
n, m = map(int, input().split()) i = 0 t = 1 bef = "_" have = [0] * n cnt = 0 for _ in range(m - 1): l = input() if l != bef and bef[0] == "d": if bef[4] == "t": have[i] -= 2 * cnt else: have[i] -= 4 * cnt cnt = 0 i += t i %= n have[i] += 1 if l[0] == "s": i += 2 * t elif l[0] == "r": t *= -1 i += t elif l[0] == "d": i += t cnt += 1 else: i += t i %= n bef = l print(i + 1, have[i] + 1)