結果
問題 |
No.726 Tree Game
|
ユーザー |
![]() |
提出日時 | 2022-08-11 08:49:53 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 580 bytes |
コンパイル時間 | 162 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 17,692 KB |
最終ジャッジ日時 | 2024-09-21 16:57:06 |
合計ジャッジ時間 | 4,211 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 WA * 3 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 not primeX 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)