結果
問題 |
No.726 Tree Game
|
ユーザー |
![]() |
提出日時 | 2021-03-15 01:49:08 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 376 bytes |
コンパイル時間 | 234 ms |
コンパイル使用メモリ | 82,416 KB |
実行使用メモリ | 53,020 KB |
最終ジャッジ日時 | 2024-11-06 14:39:24 |
合計ジャッジ時間 | 2,114 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 WA * 4 |
ソースコード
def is_prime(N): if N == 2: return True elif N&1 == 0 or N == 1: return False i = 3 while i*i <= N: if N%i == 0: return False i += 2 return True a,b = map(int,input().split()) ans = 0 if is_prime(a) and is_prime(b): ans = 1 elif a==2 or b==2: ans = 1 else: ans = (a+b+1)%2 print("First" if ans==0 else "Second")