結果

問題 No.1509 Swap!!
ユーザー rlangevinrlangevin
提出日時 2023-10-04 00:08:42
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 155 ms / 2,000 ms
コード長 232 bytes
コンパイル時間 489 ms
コンパイル使用メモリ 86,780 KB
実行使用メモリ 78,068 KB
最終ジャッジ日時 2023-10-04 00:08:52
合計ジャッジ時間 9,024 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,656 KB
testcase_01 AC 71 ms
71,548 KB
testcase_02 AC 155 ms
77,652 KB
testcase_03 AC 154 ms
77,300 KB
testcase_04 AC 154 ms
77,660 KB
testcase_05 AC 154 ms
77,792 KB
testcase_06 AC 153 ms
77,836 KB
testcase_07 AC 152 ms
77,592 KB
testcase_08 AC 152 ms
77,736 KB
testcase_09 AC 150 ms
78,044 KB
testcase_10 AC 150 ms
78,068 KB
testcase_11 AC 123 ms
77,364 KB
testcase_12 AC 123 ms
77,584 KB
testcase_13 AC 123 ms
77,548 KB
testcase_14 AC 123 ms
77,584 KB
testcase_15 AC 124 ms
77,548 KB
testcase_16 AC 118 ms
77,356 KB
testcase_17 AC 118 ms
77,392 KB
testcase_18 AC 120 ms
77,564 KB
testcase_19 AC 119 ms
77,600 KB
testcase_20 AC 118 ms
77,556 KB
testcase_21 AC 143 ms
77,436 KB
testcase_22 AC 145 ms
77,588 KB
testcase_23 AC 144 ms
77,380 KB
testcase_24 AC 146 ms
77,660 KB
testcase_25 AC 144 ms
77,496 KB
testcase_26 AC 144 ms
77,528 KB
testcase_27 AC 129 ms
77,428 KB
testcase_28 AC 130 ms
77,308 KB
testcase_29 AC 126 ms
77,516 KB
testcase_30 AC 128 ms
77,552 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
from math import gcd

T = int(input())
for _ in range(T):
    N, A, B = map(int, input().split())
    if gcd(A, B) == 1 and A - 1 <= N - B:
        print("YES")
    else:
        print("NO")    
0