結果
| 問題 | 
                            No.726 Tree Game
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2018-08-24 22:45:41 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 562 bytes | 
| コンパイル時間 | 116 ms | 
| コンパイル使用メモリ | 12,672 KB | 
| 実行使用メモリ | 10,880 KB | 
| 最終ジャッジ日時 | 2024-06-23 08:27:08 | 
| 合計ジャッジ時間 | 1,623 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 14 WA * 6 RE * 5 | 
ソースコード
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())
for x_next in range(x+1,10**9):
    if x_next%2==0:
        continue
    if isPrime(x_next):
        break
for y_next in range(y+1,10**9):
    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')