結果
| 問題 | No.35 タイパー高橋 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-10-10 15:39:09 |
| 言語 | Rust (1.94.0 + proconio + num + itertools) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 965 bytes |
| 記録 | |
| コンパイル時間 | 3,212 ms |
| コンパイル使用メモリ | 195,172 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-15 15:55:15 |
| 合計ジャッジ時間 | 5,157 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 |
ソースコード
fn getline() -> String {
let mut __ret = String::new();
std::io::stdin().read_line(&mut __ret).ok();
return __ret;
}
fn main() {
let mut number_of_correct_type = 0;
let mut number_of_miss_type = 0;
let number_of_game: i32 = getline().trim().parse().unwrap();
for _ in 0..number_of_game {
let line = getline();
let params: Vec<_> = line.trim().split(' ').collect();
let time_limit: f64 = params[0].parse().unwrap();
let word = params[1];
let word_length = word.len();
let can_type_max_word_length = (12.0 * time_limit / 1000.0) as usize;
if can_type_max_word_length >= word_length {
number_of_correct_type += word_length;
} else {
number_of_correct_type += can_type_max_word_length;
number_of_miss_type += word_length - can_type_max_word_length;
}
}
println!("{} {}", number_of_correct_type, number_of_miss_type);
}