結果
| 問題 | No.279 木の数え上げ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-12-12 20:57:18 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
AC
|
| 実行時間 | 17 ms / 2,000 ms |
| コード長 | 428 bytes |
| 記録 | |
| コンパイル時間 | 11,373 ms |
| コンパイル使用メモリ | 400,096 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2025-12-12 20:57:34 |
| 合計ジャッジ時間 | 13,191 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 21 |
ソースコード
use proconio::input;
use std::cmp::min;
use std::collections::HashMap;
fn main() {
input! {
s: String,
}
let mut hash_map = HashMap::new();
for c in s.chars() {
*hash_map.entry(c).or_insert(0) += 1;
}
let t = hash_map.get(&'t').unwrap_or(&0);
let r = hash_map.get(&'r').unwrap_or(&0);
let e = hash_map.get(&'e').unwrap_or(&0);
let ans = min(*t, min(*r, e/2));
println!("{ans}");
}