結果

問題 No.2551 2, 3, 5, 7 Game
ユーザー rlangevinrlangevin
提出日時 2024-04-08 08:55:13
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 173 ms / 2,357 ms
コード長 395 bytes
コンパイル時間 2,859 ms
コンパイル使用メモリ 81,444 KB
実行使用メモリ 76,144 KB
最終ジャッジ日時 2024-04-08 08:56:05
合計ジャッジ時間 11,021 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
53,460 KB
testcase_01 AC 34 ms
53,460 KB
testcase_02 AC 35 ms
53,460 KB
testcase_03 AC 35 ms
53,460 KB
testcase_04 AC 37 ms
53,460 KB
testcase_05 AC 150 ms
76,144 KB
testcase_06 AC 147 ms
76,016 KB
testcase_07 AC 173 ms
76,016 KB
testcase_08 AC 146 ms
76,020 KB
testcase_09 AC 123 ms
75,744 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

def ceil(x, n):
    return (x + n - 1)//n

def solve(N):
    while True:
        N2 = ceil(N, 2)
        N14 = ceil(N, 14)
        if N14 > 1:
            N = N14
        elif N2 == 1:
            print("ryota")
            return 
        else:
            print("sepa")
            return
    

T = int(input())
for _ in range(T):
    solve(int(input()))
0