結果

問題 No.2050 Speed
コンテスト
ユーザー yuzu32ut
提出日時 2022-10-07 18:04:34
言語 Rust
(1.93.0 + proconio + num + itertools)
コンパイル:
/usr/bin/rustc_custom
実行:
./target/release/main
結果
WA  
実行時間 -
コード長 1,070 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 958 ms
コンパイル使用メモリ 202,136 KB
実行使用メモリ 7,720 KB
最終ジャッジ日時 2026-03-05 05:15:48
合計ジャッジ時間 1,859 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 14 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#[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): (f32, f32) = (a as f32, ((b * 3600) as f32) / 1000.0);

    println!(
        "{}",
        match () {
            _ if a > b => "KoD",
            _ if a < b => "blackyuki",
            _ => "same",
        }
    );

    Ok(())
}
0