結果

問題 No.882 約数倍数
ユーザー GrayCoderGrayCoder
提出日時 2019-09-13 21:32:13
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 18 ms / 500 ms
コード長 312 bytes
コンパイル時間 81 ms
コンパイル使用メモリ 10,516 KB
実行使用メモリ 8,236 KB
最終ジャッジ日時 2023-09-17 06:58:11
合計ジャッジ時間 1,080 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
8,228 KB
testcase_01 AC 16 ms
8,188 KB
testcase_02 AC 18 ms
8,060 KB
testcase_03 AC 17 ms
8,188 KB
testcase_04 AC 16 ms
8,232 KB
testcase_05 AC 15 ms
8,236 KB
testcase_06 AC 15 ms
8,088 KB
testcase_07 AC 15 ms
8,188 KB
testcase_08 AC 17 ms
8,184 KB
testcase_09 AC 15 ms
8,120 KB
testcase_10 AC 15 ms
8,212 KB
testcase_11 AC 15 ms
8,144 KB
testcase_12 AC 15 ms
8,176 KB
testcase_13 AC 15 ms
8,092 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools
from sys import stdin

def main():
    A, B = map(int, input().split())

    for i in itertools.count(1):
        n = B * i
        if A < n:
            print('NO')
            break
        if not A % n:
            print('YES')
            break

input = lambda: stdin.readline()[:-1]
main()
0