結果

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

ソースコード

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--;
    cout << ans << endl;

    return 0;
}
0