結果

問題 No.2201 p@$$w0rd
ユーザー srjywrdnprkt
提出日時 2023-08-27 02:10:45
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 408 bytes
コンパイル時間 2,180 ms
コンパイル使用メモリ 194,168 KB
最終ジャッジ日時 2025-02-16 14:57:43
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;
using ll = long long;

int main(){

    string S;
    cin >> S;
    int lo=0, as=0, a, b, ans;
    for (int i=0; i<8; i++){
        if (S[i] == 'l' || S[i] == 'o') lo++;
        else if (S[i] == 'a' || S[i] == 's') as++;
    }

    a = (1<<lo)-1;
    b = (1<<as)-1;
    ans = a*b;
    if (lo+as == 8 && ans > 0) ans--;
    cout << ans << endl;

    return 0;
}
0