結果
問題 |
No.2201 p@$$w0rd
|
ユーザー |
![]() |
提出日時 | 2023-09-24 16:47:38 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 87 ms / 2,000 ms |
コード長 | 650 bytes |
コンパイル時間 | 1,967 ms |
コンパイル使用メモリ | 193,936 KB |
最終ジャッジ日時 | 2025-02-17 02:09:35 |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 |
ソースコード
#include <bits/stdc++.h> #include<iostream> #include<map> #include<vector> #include <algorithm> #include<math.h> #include <iomanip> #include<set> #include <numeric> #include<string> using ll = long long; using namespace std; int main() { string s; cin >> s; int num = 0, sym = 0, dec = 0; for (ll i = 0; i < 8; i++){ if (s[i] == 'a') sym++; else if (s[i] == 's') sym++; else if (s[i] == 'l') num++; else if (s[i] == 'o') num++; } if (sym + num == 8 && sym != 8 && num != 8) dec++; if (sym) sym = pow(2, sym) - 1; if (num) num = pow(2, num) - 1; cout << sym * num - dec << endl; }