結果

問題 No.1509 Swap!!
ユーザー 👑 rin204rin204
提出日時 2022-01-27 00:52:08
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 255 ms / 2,000 ms
コード長 240 bytes
コンパイル時間 523 ms
コンパイル使用メモリ 87,056 KB
実行使用メモリ 78,712 KB
最終ジャッジ日時 2023-08-25 14:25:15
合計ジャッジ時間 9,189 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
71,176 KB
testcase_01 AC 70 ms
71,100 KB
testcase_02 AC 255 ms
78,628 KB
testcase_03 AC 236 ms
78,596 KB
testcase_04 AC 241 ms
78,588 KB
testcase_05 AC 249 ms
78,600 KB
testcase_06 AC 230 ms
78,712 KB
testcase_07 AC 228 ms
78,580 KB
testcase_08 AC 225 ms
78,448 KB
testcase_09 AC 228 ms
78,592 KB
testcase_10 AC 241 ms
78,512 KB
testcase_11 AC 215 ms
78,448 KB
testcase_12 AC 207 ms
78,484 KB
testcase_13 AC 213 ms
78,300 KB
testcase_14 AC 207 ms
78,412 KB
testcase_15 AC 199 ms
78,396 KB
testcase_16 AC 200 ms
78,572 KB
testcase_17 AC 198 ms
78,156 KB
testcase_18 AC 199 ms
78,428 KB
testcase_19 AC 203 ms
78,496 KB
testcase_20 AC 193 ms
78,440 KB
testcase_21 AC 230 ms
78,440 KB
testcase_22 AC 236 ms
78,416 KB
testcase_23 AC 223 ms
78,436 KB
testcase_24 AC 219 ms
78,420 KB
testcase_25 AC 221 ms
78,512 KB
testcase_26 AC 225 ms
78,528 KB
testcase_27 AC 209 ms
78,376 KB
testcase_28 AC 208 ms
78,380 KB
testcase_29 AC 235 ms
78,312 KB
testcase_30 AC 235 ms
78,088 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import gcd

def solve():
    n, a, b = map(int, input().split())
    if gcd(a, b) != 1:
        print("NO")
    elif a + b <= n + 1:
        print("YES")
    else:
        print("NO")
    
for _ in range(int(input())):
    solve()
0