結果

問題 No.2285 Make A Unit Square
ユーザー hirayuu_yc
提出日時 2025-01-25 12:21:57
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 327 ms / 2,000 ms
コード長 671 bytes
コンパイル時間 181 ms
コンパイル使用メモリ 82,420 KB
実行使用メモリ 76,544 KB
最終ジャッジ日時 2025-01-25 12:22:20
合計ジャッジ時間 1,851 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

def gru(x):
    if x-1 in {0,1,2,16,18,19,33,36,53}:
        return ans[x-1]
    return ans[(x-1)%34+68]
ans=[-1,0,0, 1, 1, 2, 0, 3, 1, 1, 0, 3, 3, 2, 2, 4, 0, 5, 2, 2, 3, 3, 0, 1, 1, 3, 0, 2, 1, 1, 0, 4, 5, 2, 7, 4, 0, 1, 1, 2, 0, 3, 1, 1, 0, 3, 3, 2, 2, 4, 4, 5, 5, 2, 3, 3, 0, 1, 1, 3, 0, 2, 1, 1, 0, 4, 5, 3, 7, 4, 8, 1, 1, 2, 0, 3, 1, 1, 0, 3, 3, 2, 2, 4, 4, 5, 5, 9, 3, 3, 0, 1, 1, 3, 0, 2, 1, 1, 0, 4, 5, 3, 7, 4, 8, 1, 1, 2, 0, 3, 1, 1, 0, 3, 3, 2, 2, 4, 4, 5, 5, 9, 3, 3, 0, 1, 1, 3, 0, 2, 1, 1, 0, 4]
lgh=len(ans)
for i in range(lgh):
    ans[i]+=1
T=int(input())
for _ in range(T):
    a,b=map(int,input().split())
    print(["First","Second"][gru(a)==gru(b)])
0