結果

問題 No.726 Tree Game
ユーザー nebukuro09
提出日時 2018-08-24 21:26:20
言語 PyPy2
(7.3.15)
結果
WA  
実行時間 -
コード長 312 bytes
コンパイル時間 425 ms
コンパイル使用メモリ 76,928 KB
実行使用メモリ 76,288 KB
最終ジャッジ日時 2024-06-23 06:39:16
合計ジャッジ時間 3,373 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 23 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

X, Y = map(int, raw_input().split())
x = X + 1
y = Y + 1

def is_prime(n):
    i = 2
    while i * i <= n:
        if n % i == 0:
            return False
        i += 1
    return True

while not is_prime(x):
    x += 1

while not is_prime(y):
    y += 1

d = x - X + y - Y
print "First" if d % 2 else "Second"
0