結果

問題 No.2201 p@$$w0rd
ユーザー horiesiniti
提出日時 2023-04-22 05:41:49
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 32 ms / 2,000 ms
コード長 376 bytes
コンパイル時間 76 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-11-06 20:57:20
合計ジャッジ時間 1,743 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

import re
def check(l):
	s="".join(l)
	c=0
	for e in [r"[a-z]",r"[0-9]",r"[\@\$]"]:
		if re.search(e,s):c+=1
	return c==3
def f(s,i):
	res=0
	if i==8:
		if check(s):
			return 1
		else:
			return 0
	else:
		for e in [['l',"1"],['o',"0"],['a',"@"],['s',"$"]]:
			if s[i]==e[0]:
				s[i]=e[1]
				res+=f(s,i+1)
				s[i]=e[0]
		res+=f(s,i+1)
	return res
print(f(list(input()),0))
0