結果
問題 |
No.2593 Reorder and Mod 120
|
ユーザー |
![]() |
提出日時 | 2023-12-21 06:59:00 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 301 bytes |
コンパイル時間 | 342 ms |
コンパイル使用メモリ | 82,140 KB |
実行使用メモリ | 76,872 KB |
最終ジャッジ日時 | 2024-09-27 10:47:10 |
合計ジャッジ時間 | 2,653 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 9 WA * 17 |
ソースコード
n = int(input()) d = [0] * 10 for c in input(): d[ord(c)-48] += 1 t = min(n, 3) ans = [False] * 8 for x in range(10 ** (t - 1), 10 ** t): for c in map(int, str(x)): d[c] -= 1 if min(d) >= 0: ans[x % 8] = True for c in map(int, str(x)): d[c] += 1 print(sum(ans))