結果
| 問題 |
No.35 タイパー高橋
|
| コンテスト | |
| ユーザー |
💕💖💞
|
| 提出日時 | 2017-07-22 17:02:01 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 709 bytes |
| コンパイル時間 | 12,820 ms |
| コンパイル使用メモリ | 388,568 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-09 09:59:21 |
| 合計ジャッジ時間 | 13,559 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 |
コンパイルメッセージ
warning: unused imports: `HashMap`, `LinkedList`
--> src/main.rs:2:24
|
2 | use std::collections::{HashMap, LinkedList};
| ^^^^^^^ ^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: unused variable: `i`
--> src/main.rs:11:7
|
11 | for i in 0..n {
| ^ help: if this is intentional, prefix it with an underscore: `_i`
|
= note: `#[warn(unused_variables)]` on by default
ソースコード
use std::io::{self, BufRead};
use std::collections::{HashMap, LinkedList};
fn main(){
let stdin = io::stdin();
let line = stdin.lock().lines().next().unwrap().unwrap();
let n = line.parse::<i32>().unwrap();
let mut ok:i32 = 0;
let mut ng:i32 = 0;
for i in 0..n {
let line = stdin.lock().lines().next().unwrap().unwrap();
let mut iter = line.split_whitespace();
let time = iter.next().unwrap().parse::<i32>().unwrap();
let string = iter.next().unwrap();
let len = string.len() as i32;
let types = 12*time/1000;
if types >= len {
ok += len;
} else {
ok += types;
ng += len - types;
}
}
println!("{} {}", ok, ng);
}
💕💖💞