結果

問題 No.1509 Swap!!
ユーザー ayaoniayaoni
提出日時 2021-05-15 02:12:05
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 118 ms / 2,000 ms
コード長 655 bytes
コンパイル時間 497 ms
コンパイル使用メモリ 82,400 KB
実行使用メモリ 76,800 KB
最終ジャッジ日時 2024-04-10 07:02:42
合計ジャッジ時間 6,323 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
52,416 KB
testcase_01 AC 33 ms
53,392 KB
testcase_02 AC 113 ms
76,184 KB
testcase_03 AC 116 ms
76,496 KB
testcase_04 AC 116 ms
76,684 KB
testcase_05 AC 113 ms
76,012 KB
testcase_06 AC 111 ms
76,368 KB
testcase_07 AC 112 ms
76,088 KB
testcase_08 AC 114 ms
76,400 KB
testcase_09 AC 114 ms
76,800 KB
testcase_10 AC 118 ms
76,412 KB
testcase_11 AC 91 ms
76,152 KB
testcase_12 AC 93 ms
76,336 KB
testcase_13 AC 90 ms
76,608 KB
testcase_14 AC 86 ms
76,516 KB
testcase_15 AC 85 ms
76,056 KB
testcase_16 AC 82 ms
76,028 KB
testcase_17 AC 80 ms
76,396 KB
testcase_18 AC 80 ms
76,068 KB
testcase_19 AC 78 ms
76,228 KB
testcase_20 AC 80 ms
76,272 KB
testcase_21 AC 107 ms
76,384 KB
testcase_22 AC 107 ms
76,620 KB
testcase_23 AC 105 ms
76,260 KB
testcase_24 AC 110 ms
76,444 KB
testcase_25 AC 107 ms
76,108 KB
testcase_26 AC 105 ms
76,364 KB
testcase_27 AC 94 ms
76,160 KB
testcase_28 AC 92 ms
76,100 KB
testcase_29 AC 93 ms
76,456 KB
testcase_30 AC 93 ms
76,140 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
from math import gcd
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())


T = I()
for _ in range(T):
    N,A,B = MI()
    g = gcd(A,B)
    if g > 1:
        print('NO')
        continue

    if A+B <= N+1:
        print('YES')
    else:
        print('NO')
0