結果
| 問題 |
No.2867 NOT FOUND 404 Again
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-08-13 10:42:13 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 496 bytes |
| コンパイル時間 | 397 ms |
| コンパイル使用メモリ | 82,724 KB |
| 実行使用メモリ | 129,424 KB |
| 最終ジャッジ日時 | 2025-08-13 10:42:45 |
| 合計ジャッジ時間 | 30,566 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 18 |
ソースコード
N = list(map(int, input()))
D = len(N)
M = 4
now = [[0] * M for _ in range(2)]
now[0][0] = 1
for i, n in enumerate(N):
nxt = [[0] * M for _ in range(2)]
for smaller in range(2):
for j in range(M-1):
for x in range(10 if smaller else n + 1):
cond = (j == 0 and x == 4) or (j == 1 and x == 0) or (j == 2 and x == 4)
nxt[smaller or x < n][j+1 if cond else x == 4] += now[smaller][j]
now = [[v % 998244353 for v in row] for row in nxt]