結果

問題 No.882 約数倍数
ユーザー kaisendon_1206kaisendon_1206
提出日時 2020-03-19 09:33:50
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 410 bytes
コンパイル時間 478 ms
コンパイル使用メモリ 10,540 KB
実行使用メモリ 7,940 KB
最終ジャッジ日時 2023-08-20 20:42:03
合計ジャッジ時間 1,288 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
7,820 KB
testcase_01 AC 14 ms
7,848 KB
testcase_02 WA -
testcase_03 AC 14 ms
7,884 KB
testcase_04 AC 14 ms
7,936 KB
testcase_05 AC 13 ms
7,780 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 14 ms
7,828 KB
testcase_09 WA -
testcase_10 AC 12 ms
7,816 KB
testcase_11 AC 13 ms
7,772 KB
testcase_12 WA -
testcase_13 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

A, B = map(int, input().strip().split(' '))

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1): #9…[1,2,3]
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    divisors.sort()
    return divisors

div = make_divisors(A)

for x in div:
    if x % 3 == 0:
        print('YES')
        break
else:
    print('NO')
0