結果
| 問題 |
No.726 Tree Game
|
| コンテスト | |
| ユーザー |
Yamada
|
| 提出日時 | 2019-01-13 02:22:10 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 513 bytes |
| コンパイル時間 | 178 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-12-23 20:00:48 |
| 合計ジャッジ時間 | 1,900 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 WA * 1 |
ソースコード
def hantei(N):
if N < 2:
return False
elif N == 2:
return True
elif N % 2 == 0:
return False
for i in range(int(N**0.5/2)):
if(N%(3+2*i) == 0):
return False
return True
X,Y =map(int,input().split())
X1 =X+1
Y1 =Y+1
while not(hantei(X1)) and X1 !=10**1333:
X1 +=1
while not(hantei(Y1)) and Y1 !=10**1333:
Y1 +=1
X1 -= X
Y1 -= Y
if hantei(X) and hantei(Y):
print("Second")
elif (X1+Y1)%2 ==0:
print("Second")
else:
print("First")
Yamada