結果
| 問題 |
No.726 Tree Game
|
| コンテスト | |
| ユーザー |
vwxyz
|
| 提出日時 | 2022-08-11 08:50:40 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 598 bytes |
| コンパイル時間 | 199 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 16,128 KB |
| 最終ジャッジ日時 | 2024-09-21 16:57:43 |
| 合計ジャッジ時間 | 4,465 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 15 WA * 1 TLE * 1 -- * 8 |
ソースコード
import sys
readline=sys.stdin.readline
Y,X=map(int,readline().split())
primeX,primeY=[],[]
for x in range(2,X):
if x**2>X:
continue
if X%x==0:
primeX.append(x)
for y in range(2,Y):
if y**2>Y:
continue
if Y%y==0:
primeY.append(y)
if X>=2 and not primeX and Y>=2 and not primeY:
ans="Second"
else:
if (X,Y)==(1,1):
ans="Second"
elif 1 in (X,Y):
if (X+Y)%2:
ans="Second"
else:
ans="First"
else:
if (X+Y)%2:
ans="First"
else:
ans="Second"
print(ans)
vwxyz