結果
問題 |
No.726 Tree Game
|
ユーザー |
![]() |
提出日時 | 2022-08-11 08:49:07 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 580 bytes |
コンパイル時間 | 82 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 16,128 KB |
最終ジャッジ日時 | 2024-09-21 16:56:44 |
合計ジャッジ時間 | 4,184 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 WA * 2 TLE * 1 -- * 8 |
ソースコード
import sys readline=sys.stdin.readline Y,X=map(int,readline().split()) primeX,primeY=[],[] for x in range(1,X): if x**2>X: continue if X%x==0: primeX.append(x) for y in range(1,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)