結果
問題 | No.2593 Reorder and Mod 120 |
ユーザー |
![]() |
提出日時 | 2023-12-21 07:00:25 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 60 ms / 2,000 ms |
コード長 | 303 bytes |
コンパイル時間 | 284 ms |
コンパイル使用メモリ | 81,972 KB |
実行使用メモリ | 76,736 KB |
最終ジャッジ日時 | 2024-09-27 10:47:13 |
合計ジャッジ時間 | 2,599 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 26 |
ソースコード
n = int(input()) d = [0] * 10 for c in input(): d[ord(c)-48] += 1 t = min(n, 3) ans = [False] * 40 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 % 40] = True for c in map(int, str(x)): d[c] += 1 print(sum(ans))