結果
| 問題 |
No.1809 Divide NCK
|
| コンテスト | |
| ユーザー |
👑 SPD_9X2
|
| 提出日時 | 2022-01-14 21:37:42 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 198 bytes |
| コンパイル時間 | 247 ms |
| コンパイル使用メモリ | 82,432 KB |
| 実行使用メモリ | 52,352 KB |
| 最終ジャッジ日時 | 2024-11-20 08:31:07 |
| 合計ジャッジ時間 | 2,965 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 WA * 22 |
ソースコード
def cont(x):
ret = 0
div = M
while x >= div:
ret += x // div
div *= M
return ret
N,K,M = map(int,input().split())
ans = cont(N) - cont(K) - cont(N-K)
print (ans)
SPD_9X2