結果
問題 | No.2201 p@$$w0rd |
ユーザー |
|
提出日時 | 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 |
ソースコード
s = input()n = len(s)res1 = 0res2 = 0for i in range(n):if s[i] in ['l', 'o']:res1 += 1elif s[i] in ['a', 's']:res2 += 1ans = 2**res1 - 1ans *= 2**res2 - 1if res1 > 0 and res2 > 0 and res1 + res2 == n:ans -= 1print(ans)