結果
| 問題 |
No.2050 Speed
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-10-07 18:07:07 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 1,086 bytes |
| コンパイル時間 | 12,399 ms |
| コンパイル使用メモリ | 387,804 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-12 01:00:54 |
| 合計ジャッジ時間 | 13,335 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 15 |
ソースコード
#[allow(dead_code)]
pub mod nayuta {
use std::{error, io, result};
pub type Result<T> = result::Result<T, Box<dyn error::Error>>;
fn input_string_line() -> Result<String> {
let mut s: String = String::new();
io::stdin().read_line(&mut s)?;
Ok(s.trim().into())
}
fn input_values() -> Result<Vec<usize>> {
let s: String = input_string_line()?;
let v: Vec<usize> = s
.split_ascii_whitespace()
.map(|x: &str| x.parse::<usize>().map_err(|e| e.into()))
.collect::<Result<_>>()?;
Ok(v)
}
pub fn input_two_tuple() -> Result<(usize, usize)> {
let v: Vec<usize> = input_values()?;
Ok((v[0], v[1]))
}
}
fn main() -> nayuta::Result<()> {
let (a, b): (usize, usize) = nayuta::input_two_tuple()?;
let (a, b): (f64, f64) = (a as f64, ((b * 3600) as f64) / 1000.0);
dbg!(a, b);
println!(
"{}",
match () {
_ if a > b => "KoD",
_ if a < b => "blackyuki",
_ => "same",
}
);
Ok(())
}