結果

問題 No.525 二度寝の季節
ユーザー nanae
提出日時 2018-01-07 09:01:00
言語 D
(dmd 2.109.1)
結果
AC  
実行時間 1 ms / 1,000 ms
コード長 793 bytes
コンパイル時間 1,676 ms
コンパイル使用メモリ 135,120 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-12 23:21:10
合計ジャッジ時間 2,620 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

import std.stdio : writeln, writefln, readln;

void main() {
    import std.stdio : scanf;
    
    int h, m;
    scanf("%d:%d", &h, &m);
    solve(h, m);
}

void solve(int h, int m) {
    int t = (h*60 + m + 5) % (24*60);
    writefln("%02d:%02d", t / 60, t % 60);
}


void scan(T...)(ref T args) {
    import std.stdio : readln;
    import std.array : split;
    import std.conv  : to;
    import std.range.primitives;

    string[] line = readln.split;
    foreach (ref arg; args) {
        arg = line.front.to!(typeof(arg));
        line.popFront();
    }
    assert(line.empty);
}



void fillAll(R, T)(ref R arr, T value) {
    static if (is(typeof(arr[] = value))) {
        arr[] = value;
    }
    else {
        foreach (ref e; arr) {
            fillAll(e, value);
        }
    }
}
0