結果
| 問題 |
No.2201 p@$$w0rd
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-07-14 00:02:42 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 292 bytes |
| コンパイル時間 | 15,724 ms |
| コンパイル使用メモリ | 394,492 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-14 00:03:00 |
| 合計ジャッジ時間 | 13,627 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge6 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 |
ソースコード
fn main() {
let mut s = String::new();
std::io::stdin().read_line(&mut s).ok();
let (mut w, mut d, mut o) = (1u8, 1, 1);
for c in s.trim().chars() {
match c {
'a' | 's' => w *= 2,
'l' | 'o' => d *= 2,
_ => o = 0,
}
}
println!("{}", ((w - 1) * (d - 1)).saturating_sub(o))
}