結果

問題 No.726 Tree Game
ユーザー ayaoniayaoni
提出日時 2020-12-26 15:05:02
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 888 bytes
コンパイル時間 1,688 ms
コンパイル使用メモリ 81,736 KB
実行使用メモリ 59,832 KB
最終ジャッジ日時 2023-10-24 22:56:06
合計ジャッジ時間 2,793 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
53,740 KB
testcase_01 AC 38 ms
53,740 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 38 ms
53,740 KB
testcase_05 WA -
testcase_06 AC 37 ms
53,740 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 37 ms
53,740 KB
testcase_11 AC 38 ms
53,740 KB
testcase_12 AC 38 ms
53,740 KB
testcase_13 WA -
testcase_14 AC 38 ms
53,740 KB
testcase_15 AC 37 ms
53,740 KB
testcase_16 WA -
testcase_17 AC 43 ms
59,832 KB
testcase_18 WA -
testcase_19 AC 45 ms
59,832 KB
testcase_20 AC 43 ms
59,832 KB
testcase_21 AC 44 ms
59,832 KB
testcase_22 AC 43 ms
59,832 KB
testcase_23 AC 44 ms
59,832 KB
testcase_24 AC 43 ms
59,832 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
def LS2(): return list(sys.stdin.readline().rstrip())


Y,X = MI()

for i in range(Y,10**10):
    for j in range(2,int(i**.5)+1):
        if i % j == 0:
            break
    else:
        pY = i
        break

for i in range(X,10**10):
    for j in range(2,int(i**.5)+1):
        if i % j == 0:
            break
    else:
        pX = i
        break

if X == pX or Y == pY:
    print('First')
else:
    if (pX-1-X+pY-1-Y) % 2 == 0:
        print('Second')
    else:
        print('First')
0