結果
| 問題 | No.726 Tree Game |
| コンテスト | |
| ユーザー |
vwxyz
|
| 提出日時 | 2022-08-11 08:50:40 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 598 bytes |
| 記録 | |
| コンパイル時間 | 287 ms |
| コンパイル使用メモリ | 21,340 KB |
| 実行使用メモリ | 15,788 KB |
| 最終ジャッジ日時 | 2026-09-01 18:49:32 |
| 合計ジャッジ時間 | 6,608 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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