結果
| 問題 |
No.1651 Removing Cards
|
| コンテスト | |
| ユーザー |
hir355
|
| 提出日時 | 2021-08-20 22:31:24 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 240 bytes |
| コンパイル時間 | 235 ms |
| コンパイル使用メモリ | 82,304 KB |
| 実行使用メモリ | 856,604 KB |
| 最終ジャッジ日時 | 2024-10-14 04:28:45 |
| 合計ジャッジ時間 | 7,047 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | MLE * 1 -- * 2 |
| other | -- * 32 |
ソースコード
from bisect import bisect_right
k, q = map(int, input().split())
a = [0] * (1000001)
a[0] = 1
for i in range(1000000):
a[i + 1] = (a[i] * k - 1) // (k - 1) + 1
for _ in range(q):
n = int(input())
print(a[bisect_right(a, n) - 1])
hir355