結果

問題 No.651 E869120 and Driving
ユーザー ジョギングジョギング
提出日時 2018-03-17 00:12:52
言語 Rust
(1.77.0)
結果
WA  
実行時間 -
コード長 509 bytes
コンパイル時間 1,429 ms
コンパイル使用メモリ 132,200 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-23 12:12:52
合計ジャッジ時間 1,338 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

use std::io::{stdin, Read};

fn main() {
    let mut buf = String::new();
    stdin().read_to_string(&mut buf).unwrap();
    let mut buf = buf.split_whitespace();
    let mut get = || buf.next().unwrap().parse::<i32>().unwrap();
    
    let mut a = get() * 60;
    let mut m = 0;
    let mut h = 10;
    loop {
        if a <= 0 {
            println!("{}:{}", h, m);
            break;
        }
        a -= 100;
        m += 1;
        if m >= 60 {
            m = 0;
            h += 1;
        }
    }
}
0