結果

問題 No.2551 2, 3, 5, 7 Game
ユーザー fiblonaria
提出日時 2023-11-28 21:01:51
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 289 bytes
コンパイル時間 291 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 323,940 KB
最終ジャッジ日時 2024-09-26 13:05:24
合計ジャッジ時間 5,402 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 5 TLE * 1 -- * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

from functools import cache 

@cache
def calc(N):
    if N == 1:
        return False
    for i in [2, 3, 5, 7]:
        if calc((N + i - 1) // i):
            return False
    return True


T = int(input())
for i in range(T):
    N = int(input())
    print("ryota" if calc(N) else "sepa")
0