結果
| 問題 |
No.2867 NOT FOUND 404 Again
|
| コンテスト | |
| ユーザー |
寝癖
|
| 提出日時 | 2024-07-08 12:34:44 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 481 bytes |
| コンパイル時間 | 339 ms |
| コンパイル使用メモリ | 82,944 KB |
| 実行使用メモリ | 268,612 KB |
| 最終ジャッジ日時 | 2024-08-01 13:29:03 |
| 合計ジャッジ時間 | 5,052 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 1 TLE * 1 -- * 16 |
ソースコード
N = list(map(int, input()))
D = len(N)
M = 100
now = [0] * (2*M)
now[0] = 1
for i, n in enumerate(N):
nxt = [0] * (2*M)
for smaller in range(2):
for j in range(M):
if not now[smaller*M+j]:
continue
for x in range(10 if smaller else n + 1):
if j*10+x == 404:
continue
nxt[(smaller or x < n)*M+(j*10+x)%M] += now[smaller*M+j]
now = nxt
print((sum(now) - 1) % 998244353)
寝癖