結果

問題 No.1509 Swap!!
ユーザー convexineqconvexineq
提出日時 2021-05-14 23:44:43
言語 PyPy3
(7.3.8)
結果
AC  
実行時間 340 ms / 2,000 ms
コード長 215 bytes
コンパイル時間 548 ms
使用メモリ 83,100 KB
最終ジャッジ日時 2022-11-25 23:28:11
合計ジャッジ時間 12,853 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 77 ms
75,848 KB
testcase_01 AC 80 ms
76,000 KB
testcase_02 AC 322 ms
83,052 KB
testcase_03 AC 329 ms
82,892 KB
testcase_04 AC 325 ms
82,512 KB
testcase_05 AC 322 ms
82,576 KB
testcase_06 AC 328 ms
82,656 KB
testcase_07 AC 324 ms
82,736 KB
testcase_08 AC 332 ms
83,100 KB
testcase_09 AC 330 ms
82,756 KB
testcase_10 AC 335 ms
82,936 KB
testcase_11 AC 298 ms
82,396 KB
testcase_12 AC 312 ms
82,276 KB
testcase_13 AC 310 ms
82,536 KB
testcase_14 AC 305 ms
82,208 KB
testcase_15 AC 301 ms
82,464 KB
testcase_16 AC 300 ms
82,440 KB
testcase_17 AC 309 ms
82,248 KB
testcase_18 AC 300 ms
82,468 KB
testcase_19 AC 289 ms
82,208 KB
testcase_20 AC 290 ms
82,244 KB
testcase_21 AC 333 ms
82,508 KB
testcase_22 AC 335 ms
82,736 KB
testcase_23 AC 340 ms
82,496 KB
testcase_24 AC 330 ms
82,504 KB
testcase_25 AC 313 ms
82,664 KB
testcase_26 AC 311 ms
82,616 KB
testcase_27 AC 287 ms
82,204 KB
testcase_28 AC 294 ms
82,248 KB
testcase_29 AC 293 ms
82,256 KB
testcase_30 AC 299 ms
82,292 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import gcd
def check(n,a,b):
    if gcd(a,b) > 1:
        return 0
    return a+b <= n+1

T = int(input())
for _ in range(T):
    n,a,b = map(int,input().split())
    print("YES" if check(n,a,b) else "NO")
0