結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
70,884 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 204 ms
78,056 KB
testcase_12 AC 206 ms
78,516 KB
testcase_13 AC 203 ms
78,572 KB
testcase_14 AC 204 ms
78,356 KB
testcase_15 AC 201 ms
78,396 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 235 ms
78,624 KB
testcase_22 AC 237 ms
78,372 KB
testcase_23 AC 249 ms
78,588 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 208 ms
78,532 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:
        print("NO")
        return
    else:
        print("YES")
    
for _ in range(int(input())):
    solve()
0