結果
| 問題 |
No.525 二度寝の季節
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-09-09 05:19:13 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 286 bytes |
| コンパイル時間 | 2,215 ms |
| コンパイル使用メモリ | 191,852 KB |
| 最終ジャッジ日時 | 2025-01-14 08:47:38 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 33 |
コンパイルメッセージ
main.cpp: In function ‘void solve()’:
main.cpp:7:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%d:%d", &hh, &mm);
| ~~~~~^~~~~~~~~~~~~~~~~~~
ソースコード
#include <bits/stdc++.h>
using namespace std;
void solve() {
int hh, mm, t;
string s;
scanf("%d:%d", &hh, &mm);
t = (hh * 60 + mm + 5) % 1440;
hh = t / 60;
mm = t % 60;
printf("%02d:%02d", hh, mm);
}
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
solve();
}