結果
問題 |
No.726 Tree Game
|
ユーザー |
|
提出日時 | 2018-08-24 23:30:40 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 615 bytes |
コンパイル時間 | 411 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-06-23 10:17:21 |
合計ジャッジ時間 | 1,835 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 23 WA * 2 |
ソースコード
def isPrime(num): if num==1: return False if num==2: return True if num%2==0: return False for i in range(3,int(num**.5)+1,2): if num%i==0: return False return True x,y = map(int,input().split()) if x<=2 or y<=2: print('Second') exit() for x_next in range(x+1,10**10): if x_next%2==0: continue if isPrime(x_next): break for y_next in range(y+1,10**10): if y_next%2==0: continue if isPrime(y_next): break flag = (x_next+y_next-x-y)%2==1 if flag: print('First') else: print('Second')