結果
| 問題 |
No.726 Tree Game
|
| コンテスト | |
| ユーザー |
takakin
|
| 提出日時 | 2020-07-08 23:03:37 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 550 bytes |
| コンパイル時間 | 133 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-10-05 00:32:42 |
| 合計ジャッジ時間 | 2,203 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 23 WA * 2 |
ソースコード
import sys
input=lambda: sys.stdin.readline().rstrip()
y,x=map(int,input().split())
def prime(n):
divisors=[]
for i in range(1,int(n**0.5)+1):
if n%i==0:
divisors.append(i)
if i!=n//i:
divisors.append(n//i)
return len(divisors)==2
if y==1:
yy=1
else:
for i in range(1,y):
if prime(y+i):
yy=i
break
else:
continue
if x==1:
xx=1
else:
for i in range(1,x):
if prime(x+i):
xx=i
break
else:
continue
if (yy-xx)%2==0:
print("Second")
else:
print("First")
takakin