結果
| 問題 | No.2593 Reorder and Mod 120 |
| コンテスト | |
| ユーザー |
Kude
|
| 提出日時 | 2023-12-21 07:00:25 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 46 ms / 2,000 ms |
| コード長 | 303 bytes |
| 記録 | |
| コンパイル時間 | 274 ms |
| コンパイル使用メモリ | 84,992 KB |
| 実行使用メモリ | 77,184 KB |
| 最終ジャッジ日時 | 2026-04-14 06:34:29 |
| 合計ジャッジ時間 | 2,580 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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))
Kude