結果

問題 No.2593 Reorder and Mod 120
コンテスト
ユーザー 👑 p-adic
提出日時 2023-11-26 18:07:59
言語 Python3
(3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 122 ms / 2,000 ms
+ 694µs
コード長 207 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 284 ms
コンパイル使用メモリ 21,340 KB
実行使用メモリ 15,788 KB
最終ジャッジ日時 2026-09-05 05:58:52
合計ジャッジ時間 4,765 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 26
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

I,R=input,range
N=int(I())
c=[0]*10
b=[0]*40
for s in I():c[int(s)]+=1
for n in R(1000):
	T,m=[0]*10,n
	while m:
		T[m%10]+=1
		m//=10
	b[n%40]|=(sum(T)==min(N,3))*all(T[i]<=c[i]for i in R(10))
print(sum(b))
0