結果
問題 |
No.3045 反復重み付き累積和
|
ユーザー |
![]() |
提出日時 | 2025-06-12 20:24:53 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 451 bytes |
コンパイル時間 | 189 ms |
コンパイル使用メモリ | 82,048 KB |
実行使用メモリ | 52,352 KB |
最終ジャッジ日時 | 2025-06-12 20:24:57 |
合計ジャッジ時間 | 3,477 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 41 |
ソースコード
def count_exact_prime_factors(N, M): primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29] if M == 0: return 1 if N >= 1 else 0 if M > len(primes): return 0 product = 1 for i in range(M): product *= primes[i] if product > N: return 0 return N // product # Read input N, M = map(int, input().split()) # Compute and print the result print(count_exact_prime_factors(N, M))