結果

問題 No.32 貯金箱の憂鬱
ユーザー Yusuke WadaYusuke Wada
提出日時 2020-07-10 11:43:36
言語 Rust
(1.77.0)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 873 bytes
コンパイル時間 4,121 ms
コンパイル使用メモリ 133,336 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-30 13:55:50
合計ジャッジ時間 1,113 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 1 ms
4,384 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 1 ms
4,376 KB
testcase_09 AC 1 ms
4,380 KB
testcase_10 AC 1 ms
4,376 KB
testcase_11 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

fn getline() -> String {
    let mut __ret = String::new();
    std::io::stdin().read_line(&mut __ret).ok();
    return __ret;
}

fn main() {
    let ll = getline();
    let ml = getline();
    let nl = getline();
    let alv: Vec<_> = ll.trim().split(' ').collect();
    let mlv: Vec<_> = ml.trim().split(' ').collect();
    let nlv: Vec<_> = nl.trim().split(' ').collect();
    let l: u32 = alv[0].parse().unwrap();
    let m: u32 = mlv[0].parse().unwrap();
    let n: u32 = nlv[0].parse().unwrap();

    let num_25: u32 = n / 25 + m;
    let mod_1 = n % 25;
    let num_100 = num_25 * 25 / 100 + l;
    let mod_25 = (num_25 * 25 % 100) / 25;
    let mod_100 = num_100 * 100 % 1000 / 100;

    println!("{}", mod_1 + mod_25 + mod_100);

    // let input = &args[0];
    // let range = 1..=input.parse::<u64>().unwrap();
    //
    // println!("{}", range.sum::<u4>());
}
0