結果
| 問題 | No.3300 Frog Game |
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2025-10-05 15:31:21 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 64 ms / 2,000 ms |
| + 778µs | |
| コード長 | 429 bytes |
| 記録 | |
| コンパイル時間 | 300 ms |
| コンパイル使用メモリ | 96,232 KB |
| 実行使用メモリ | 79,104 KB |
| 最終ジャッジ日時 | 2026-07-15 13:07:30 |
| 合計ジャッジ時間 | 4,377 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 35 |
ソースコード
N, A, B = map(int, input().split())
N -= 1
def is_win(n):
if n <= 0:
return True
if n - A <= 0:
return False
if n - B <= 0:
return ((n + A - 1) // A) % 2 == 0
return not is_win(n - A) or not is_win(n - B)
if not is_win(N % (A + B)):
print("ryota")
exit()
if not is_win((N - 2 * A) % (A + B)) and not is_win((N - 2 * B) % (A + B)):
print("ryota")
exit()
print("sepa")