結果
問題 |
No.726 Tree Game
|
ユーザー |
|
提出日時 | 2018-08-24 21:35:14 |
言語 | PyPy2 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 508 bytes |
コンパイル時間 | 1,525 ms |
コンパイル使用メモリ | 76,556 KB |
実行使用メモリ | 76,308 KB |
最終ジャッジ日時 | 2024-06-23 06:48:24 |
合計ジャッジ時間 | 4,036 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 2 RE * 23 |
ソースコード
X, Y = map(int, raw_input().split()) def is_prime(n): if n == 1: return False i = 2 while i * i <= n: if n % i == 0: return False i += 1 return True if is_prime(X) and is_prime(Y): print "Second" exit() while is_prime(X): cnt += 1 X += 1 while is_prime(Y): cnt += 1 Y += 1 x = X + 1 y = Y + 1 while not is_prime(x): x += 1 while not is_prime(y): y += 1 d = x - X + y - Y print "First" if (d + cnt) % 2 else "Second"