結果
| 問題 |
No.525 二度寝の季節
|
| コンテスト | |
| ユーザー |
focus
|
| 提出日時 | 2018-01-15 19:34:12 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 551 bytes |
| コンパイル時間 | 485 ms |
| コンパイル使用メモリ | 56,028 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-24 03:14:19 |
| 合計ジャッジ時間 | 1,451 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 31 WA * 2 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:8:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
8 | scanf("%d:%d",&A,&B);
| ~~~~~^~~~~~~~~~~~~~~
ソースコード
#include<iostream>
#include<vector>
#include<string>
#include<cstdio>
using namespace std;
int main(){
int A,B;
scanf("%d:%d",&A,&B);
B+=5;
if(B>60){
B-=60;
A++;
}
if(A>23){
A=0;
}
if(B>=10){
if(A>=10){
cout << A << ':' << B;
}
else{
cout << '0' << A << ':' << B;
}
}
else{
if(A>=10){
cout << A << ":0" << B;
}
else{
cout << '0' << A << ":0" << B;
}
}
return 0;
}
focus