結果
| 問題 |
No.2201 p@$$w0rd
|
| コンテスト | |
| ユーザー |
tnakao0123
|
| 提出日時 | 2023-03-05 02:16:57 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 551 bytes |
| コンパイル時間 | 263 ms |
| コンパイル使用メモリ | 43,080 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-18 01:28:16 |
| 合計ジャッジ時間 | 1,477 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 |
ソースコード
/* -*- coding: utf-8 -*-
*
* 2201.cc: No.2201 p@$$w0rd - yukicoder
*/
#include<cstdio>
#include<algorithm>
using namespace std;
/* constant */
const int N = 8;
/* typedef */
/* global variables */
/* subroutines */
/* main */
int main() {
char s[N + 4];
scanf("%s", s);
int dn = 0, sn = 0;
for (int i = 0; i < N; i++) {
if (s[i] == 'l' || s[i] == 'o') dn++;
else if (s[i] == 'a' || s[i] == 's') sn++;
}
int x = ((1 << dn) - 1) * ((1 << sn) - 1);
if (x > 0 && dn + sn == N) x--;
printf("%d\n", x);
return 0;
}
tnakao0123