結果
| 問題 |
No.41 貯金箱の溜息(EASY)
|
| コンテスト | |
| ユーザー |
maspy
|
| 提出日時 | 2020-03-05 08:44:18 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 275 ms / 5,000 ms |
| コード長 | 462 bytes |
| コンパイル時間 | 84 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 26,112 KB |
| 最終ジャッジ日時 | 2024-10-14 00:45:36 |
| 合計ジャッジ時間 | 1,377 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 |
ソースコード
#!/usr/bin/env python3
# %%
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
import itertools
MOD = 10 ** 9 + 9
# %%
T, *M = map(int, read().split())
# %%
U = 10 ** 5
dp = [0] * U
dp[0] = 1
for n in range(1, 10):
for i in range(U - n):
dp[i + n] += dp[i]
dp_cum = list(itertools.accumulate(dp))
dp_cum = [x % MOD for x in dp_cum]
# %%
for x in M:
print(dp_cum[x // 111111])
maspy