結果
| 問題 |
No.129 お年玉(2)
|
| コンテスト | |
| ユーザー |
rlangevin
|
| 提出日時 | 2023-02-11 01:31:21 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 318 bytes |
| コンパイル時間 | 174 ms |
| コンパイル使用メモリ | 82,304 KB |
| 実行使用メモリ | 62,080 KB |
| 最終ジャッジ日時 | 2024-07-07 18:41:16 |
| 合計ジャッジ時間 | 15,395 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 4 WA * 42 |
ソースコード
N = int(input())//1000
M = int(input())
r = N % M
ans = 1
mod = 10 ** 9
inv = 1
seen = [0] * (r + 1)
for i in range(r):
now = M - i
for j in range(1, r + 1):
if seen[j]:
continue
if now % j == 0:
now //= j
seen[j] = 1
ans *= now
ans %= mod
print(ans)
rlangevin