結果
| 問題 | No.3300 Frog Game |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-10-06 00:35:06 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 37 ms / 2,000 ms |
| コード長 | 687 bytes |
| 記録 | |
| コンパイル時間 | 450 ms |
| コンパイル使用メモリ | 82,176 KB |
| 実行使用メモリ | 53,612 KB |
| 最終ジャッジ日時 | 2025-10-06 00:35:09 |
| 合計ジャッジ時間 | 3,155 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 35 |
ソースコード
import sys
input = sys.stdin.readline
N, A, B = map(int, input().split())
def solve():
M = A+B
pos = (N-2)%M
amari = M%(2*A)
if amari==0:
tmp3 = pos//A
if tmp3%2==0:
print("ryota")
else:
print("sepa")
else:
if pos>=M-amari:
if amari<=A:
print("sepa")
else:
tmp4 = amari-A
if tmp4<=pos%(2*A):
print("sepa")
else:
print("ryota")
else:
tmp3 = pos//A
if tmp3%2==0:
print("ryota")
else:
print("sepa")
solve()