結果
| 問題 |
No.2551 2, 3, 5, 7 Game
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-11-25 13:45:21 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 733 bytes |
| コンパイル時間 | 418 ms |
| コンパイル使用メモリ | 82,048 KB |
| 実行使用メモリ | 926,728 KB |
| 最終ジャッジ日時 | 2024-09-26 10:31:51 |
| 合計ジャッジ時間 | 7,557 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | MLE * 1 -- * 9 |
ソースコード
import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random
#sys.setrecursionlimit(10**9)
#sys.set_int_max_str_digits(0)
t = int(input())
#alist = list(map(int,input().split()))
#alist = []
#s = input()
#n,m = map(int,input().split())
#for i in range(n):
# alist.append(list(map(int,input().split())))
input = sys.stdin.readline
@functools.lru_cache(maxsize=1000000)
def calc(x,n,turn):
if x >= n:
return turn
else:
a = []
for i in [2,3,5,7]:
a.append(calc(x*i,n,turn^1))
if turn in a:
return turn
else:
return turn^1
for i in range(t):
n = int(input())
print('sepa' if calc(1,n,0) == 0 else 'ryota')