結果

問題 No.2051 Divide
ユーザー ShirotsumeShirotsume
提出日時 2022-08-28 02:12:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 43 ms / 2,000 ms
コード長 410 bytes
コンパイル時間 162 ms
コンパイル使用メモリ 82,504 KB
実行使用メモリ 59,600 KB
最終ジャッジ日時 2024-04-23 03:41:19
合計ジャッジ時間 2,083 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,228 KB
testcase_01 AC 37 ms
52,060 KB
testcase_02 AC 37 ms
53,464 KB
testcase_03 AC 36 ms
52,820 KB
testcase_04 AC 37 ms
53,484 KB
testcase_05 AC 37 ms
52,672 KB
testcase_06 AC 38 ms
51,940 KB
testcase_07 AC 37 ms
52,584 KB
testcase_08 AC 38 ms
53,572 KB
testcase_09 AC 37 ms
53,112 KB
testcase_10 AC 37 ms
53,572 KB
testcase_11 AC 38 ms
53,420 KB
testcase_12 AC 36 ms
52,620 KB
testcase_13 AC 38 ms
52,532 KB
testcase_14 AC 37 ms
53,356 KB
testcase_15 AC 38 ms
53,140 KB
testcase_16 AC 36 ms
53,112 KB
testcase_17 AC 43 ms
59,600 KB
testcase_18 AC 40 ms
58,560 KB
testcase_19 AC 40 ms
58,056 KB
testcase_20 AC 40 ms
58,860 KB
testcase_21 AC 40 ms
58,260 KB
testcase_22 AC 39 ms
57,960 KB
testcase_23 AC 40 ms
59,176 KB
testcase_24 AC 41 ms
58,920 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda: sys.stdin.readline().rstrip()
ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(mi())
inf = 2 ** 63 - 1
mod = 998244353

a, b = mi()

if a % b:
    print(0)
else:
    c = a // b
    s = set()
    for i in range(1, c + 1):
        if i * i > c:
            break
        if c % i == 0:
            s.add(c // i)
            s.add(i)
    print(len(s))
0