結果

問題 No.1509 Swap!!
ユーザー 👑 rin204rin204
提出日時 2022-01-27 00:48:30
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 317 bytes
コンパイル時間 2,460 ms
コンパイル使用メモリ 86,688 KB
実行使用メモリ 79,248 KB
最終ジャッジ日時 2023-08-25 14:20:58
合計ジャッジ時間 8,817 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
71,116 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 212 ms
78,412 KB
testcase_12 AC 206 ms
78,364 KB
testcase_13 AC 203 ms
78,380 KB
testcase_14 AC 203 ms
78,532 KB
testcase_15 AC 204 ms
78,152 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 220 ms
78,460 KB
testcase_22 AC 238 ms
78,756 KB
testcase_23 AC 221 ms
78,652 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 211 ms
78,672 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import gcd

def solve():
    n, a, b = map(int, input().split())
    if gcd(a, b) != 1:
        print("NO")
        return
    
    mi = min(a, b)
    l = n - mi
    r = 1 + mi
    if l > r + 1:
        print("NO")
        return
    else:
        print("YES")
    
for _ in range(int(input())):
    solve()
0