結果

問題 No.726 Tree Game
ユーザー nebukuro09
提出日時 2018-08-24 21:28:52
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 383 bytes
コンパイル時間 612 ms
コンパイル使用メモリ 6,912 KB
実行使用メモリ 6,272 KB
最終ジャッジ日時 2024-06-23 06:41:34
合計ジャッジ時間 1,714 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 23 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

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

def is_prime(n):
    if n == 1:
        return False
    if n <= 3:
        return True
    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