結果

問題 No.2551 2, 3, 5, 7 Game
ユーザー fiblonariafiblonaria
提出日時 2023-11-28 21:01:51
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 289 bytes
コンパイル時間 247 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 368,976 KB
最終ジャッジ日時 2023-11-28 21:01:58
合計ジャッジ時間 6,290 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 204 ms
89,276 KB
testcase_01 AC 277 ms
93,856 KB
testcase_02 AC 207 ms
88,480 KB
testcase_03 AC 198 ms
89,408 KB
testcase_04 AC 207 ms
89,404 KB
testcase_05 TLE -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
権限があれば一括ダウンロードができます

ソースコード

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