結果

問題 No.2201 p@$$w0rd
ユーザー roarisroaris
提出日時 2023-02-03 21:38:35
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 91 ms / 2,000 ms
コード長 315 bytes
コンパイル時間 305 ms
コンパイル使用メモリ 86,836 KB
実行使用メモリ 71,628 KB
最終ジャッジ日時 2023-09-15 17:16:56
合計ジャッジ時間 3,488 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 89 ms
71,616 KB
testcase_01 AC 87 ms
71,616 KB
testcase_02 AC 87 ms
71,628 KB
testcase_03 AC 90 ms
71,540 KB
testcase_04 AC 86 ms
71,344 KB
testcase_05 AC 87 ms
71,348 KB
testcase_06 AC 88 ms
71,344 KB
testcase_07 AC 88 ms
71,312 KB
testcase_08 AC 88 ms
71,424 KB
testcase_09 AC 89 ms
71,536 KB
testcase_10 AC 86 ms
71,540 KB
testcase_11 AC 88 ms
71,340 KB
testcase_12 AC 90 ms
71,424 KB
testcase_13 AC 90 ms
71,612 KB
testcase_14 AC 88 ms
71,620 KB
testcase_15 AC 91 ms
71,536 KB
testcase_16 AC 88 ms
71,496 KB
testcase_17 AC 89 ms
71,256 KB
testcase_18 AC 87 ms
71,564 KB
testcase_19 AC 88 ms
71,428 KB
testcase_20 AC 91 ms
71,268 KB
testcase_21 AC 89 ms
71,340 KB
testcase_22 AC 87 ms
71,316 KB
testcase_23 AC 90 ms
71,600 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
from collections import *

S = input()[:-1]
cnt1 = S.count('l')+S.count('o')
cnt2 = S.count('a')+S.count('s')

if min(cnt1, cnt2)==0:
    ans = 0
elif cnt1+cnt2==len(S):
    ans = (pow(2, cnt1)-1)*(pow(2, cnt2)-1)-1
else:
    ans = (pow(2, cnt1)-1)*(pow(2, cnt2)-1)

print(ans)
0