結果

問題 No.2201 p@$$w0rd
ユーザー lloyzlloyz
提出日時 2023-02-03 21:35:01
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 38 ms / 2,000 ms
コード長 261 bytes
コンパイル時間 85 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,496 KB
最終ジャッジ日時 2024-07-02 19:21:05
合計ジャッジ時間 1,626 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

s = input()

n = len(s)
res1 = 0
res2 = 0
for i in range(n):
    if s[i] in ['l', 'o']:
        res1 += 1
    elif s[i] in ['a', 's']:
        res2 += 1
ans = 2**res1 - 1
ans *= 2**res2 - 1
if res1 > 0 and res2 > 0 and res1 + res2 == n:
    ans -= 1
print(ans)
0