結果

問題 No.56 消費税
ユーザー mottodora
提出日時 2016-10-16 21:29:39
言語 Rust
(1.83.0 + proconio)
結果
WA  
実行時間 -
コード長 427 bytes
コンパイル時間 12,646 ms
コンパイル使用メモリ 382,708 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-11-22 12:22:01
合計ジャッジ時間 13,897 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 18 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

fn getline() -> String{
    let mut ret = String::new();
    std::io::stdin().read_line(&mut ret).ok();
    return ret;
}
fn getintvec() -> Vec<i32> {
    let s = getline();
    s.trim().split_whitespace()
        .map(|s| s.parse().unwrap())
        .collect()
}

fn main() {
    let v = getintvec();
    let d = v[0] as f32;
    let p = v[1] as f32;
    let r = (d * (1.0 + p * 0.01)).floor() as i32;
    println!("{}", r);
}
0