結果

問題 No.726 Tree Game
ユーザー takakin
提出日時 2020-07-08 23:00:48
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 475 bytes
コンパイル時間 169 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-10-05 00:23:09
合計ジャッジ時間 2,285 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 17 WA * 2 RE * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input=lambda: sys.stdin.readline().rstrip()
y,x=map(int,input().split())

def prime(n):
  divisors=[]
  for i in range(1,int(n**0.5)+1):
    if n%i==0:
      divisors.append(i)
      if i!=n//i:
        divisors.append(n//i)

  return len(divisors)==2

for i in range(y):
  if prime(y+i):
    yy=i
    break
  else:
    continue

for i in range(x):
  if prime(x+i):
    xx=i
    break
  else:
    continue

if (yy-xx)%2==0:
  print("Second")
else:
  print("First")
0