結果
| 問題 |
No.525 二度寝の季節
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-06-18 12:08:13 |
| 言語 | D (dmd 2.109.1) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 688 bytes |
| コンパイル時間 | 1,447 ms |
| コンパイル使用メモリ | 145,752 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-12 20:12:10 |
| 合計ジャッジ時間 | 2,483 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 33 |
ソースコード
import std.stdio, std.string, std.conv, std.algorithm;
import std.range, std.array, std.container, std.math, std.typecons;
void main() {
auto s = readln.chomp;
int min = timetomin(s) + 5;
min %= 1440;
mintotime(min).writeln;
}
int timetomin(string s) {
auto hm = s.split(':').to!(int[]);
return hm[0] * 60 + hm[1];
}
string mintotime(int min)
in {
assert(0 <= min && min < 1440);
}
body {
return "%02s:%02s".format(min / 60, min % 60);
}
void scan(T...)(ref T args) {
auto line = readln.split;
foreach (ref arg; args) {
arg = line.front.to!(typeof(arg));
line.popFront;
}
assert(line.empty);
}