結果
問題 | No.41 貯金箱の溜息(EASY) |
ユーザー |
|
提出日時 | 2020-04-21 21:35:49 |
言語 | Python3 (3.11.2 + numpy 1.24.2 + scipy 1.10.1) |
結果 |
AC
|
実行時間 | 371 ms / 5,000 ms |
コード長 | 354 bytes |
コンパイル時間 | 67 ms |
実行使用メモリ | 11,720 KB |
最終ジャッジ日時 | 2022-12-02 06:58:07 |
合計ジャッジ時間 | 1,404 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge12 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 39 ms
7,928 KB |
testcase_01 | AC | 371 ms
11,720 KB |
ソースコード
T = int(input()) MOD = 10 ** 9 + 9 M = tuple(int(input()) // 111111 for _ in range(T)) MM = max(M) table = [0] * (max(M) + 1) table[0] = 1 for n in range(1, 10): for i in range(MM + 1 - n): table[i + n] = (table[i + n] + table[i]) % MOD for i in range(MM): table[i + 1] = (table[i] + table[i + 1]) % MOD for m in M: print(table[m])