結果
| 問題 | 
                            No.2201 p@$$w0rd
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2023-02-03 21:53:44 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 567 bytes | 
| コンパイル時間 | 1,578 ms | 
| コンパイル使用メモリ | 167,104 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-07-02 19:46:07 | 
| 合計ジャッジ時間 | 2,271 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 18 WA * 6 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
#define REP(i,n) for(int i=0;i<int(n);i++)
int x[5];
int main(void){
	cin.tie(nullptr);  ios_base::sync_with_stdio(false);
	int i,j,k;
	string S;
	cin >> S;
	REP(i,8){
		if(S[i]=='l') x[0]++;
		if(S[i]=='o') x[1]++;
		if(S[i]=='a') x[2]++;
		if(S[i]=='s') x[3]++;
	}
	int c=x[0]+x[1],d=x[2]+x[3];
	if(c==0 || d==0){
		cout << 0 << endl;
		return 0;
	}
	int p=1,q=1;
	for(i=1;i<=c;i++) p*=2;
	for(i=1;i<=d;i++) q*=2;
	p--;
	q--;
	cout << p*q << endl;
	return 0;
}