結果

問題 No.1509 Swap!!
ユーザー tamatotamato
提出日時 2021-05-14 22:37:58
言語 PyPy3
(7.3.8)
結果
AC  
実行時間 207 ms / 2,000 ms
コード長 347 bytes
コンパイル時間 275 ms
使用メモリ 83,416 KB
最終ジャッジ日時 2022-11-25 19:48:29
合計ジャッジ時間 8,297 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 81 ms
76,104 KB
testcase_01 AC 83 ms
76,144 KB
testcase_02 AC 198 ms
82,848 KB
testcase_03 AC 198 ms
83,232 KB
testcase_04 AC 201 ms
83,416 KB
testcase_05 AC 205 ms
82,916 KB
testcase_06 AC 202 ms
83,152 KB
testcase_07 AC 207 ms
82,628 KB
testcase_08 AC 206 ms
82,720 KB
testcase_09 AC 204 ms
82,620 KB
testcase_10 AC 203 ms
83,108 KB
testcase_11 AC 171 ms
82,380 KB
testcase_12 AC 173 ms
82,388 KB
testcase_13 AC 170 ms
82,288 KB
testcase_14 AC 172 ms
82,436 KB
testcase_15 AC 171 ms
82,224 KB
testcase_16 AC 168 ms
82,392 KB
testcase_17 AC 167 ms
82,236 KB
testcase_18 AC 160 ms
82,268 KB
testcase_19 AC 159 ms
82,264 KB
testcase_20 AC 160 ms
82,208 KB
testcase_21 AC 182 ms
82,560 KB
testcase_22 AC 182 ms
82,308 KB
testcase_23 AC 184 ms
82,320 KB
testcase_24 AC 188 ms
82,916 KB
testcase_25 AC 185 ms
82,360 KB
testcase_26 AC 182 ms
82,440 KB
testcase_27 AC 162 ms
82,184 KB
testcase_28 AC 166 ms
82,444 KB
testcase_29 AC 163 ms
82,368 KB
testcase_30 AC 166 ms
82,408 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 1000000007
eps = 10**-9


def main():
    import sys
    from math import gcd
    input = sys.stdin.readline

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


if __name__ == '__main__':
    main()
0