結果

問題 No.525 二度寝の季節
コンテスト
ユーザー Keidaroo
提出日時 2017-06-09 22:33:53
言語 C++11
(gcc 15.3.0 + boost 1.92.0)
コンパイル:
g++-15 -O2 -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 1 ms / 1,000 ms
+ 329µs
コード長 596 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 301 ms
コンパイル使用メモリ 84,452 KB
実行使用メモリ 9,784 KB
最終ジャッジ日時 2026-09-02 13:46:14
合計ジャッジ時間 2,004 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include<iostream>
#include<stdio.h>
#include<string.h>
#include<queue>
using namespace std;

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
typedef long long ll;

int main()
{
	char a[5];
	REP(i, 5) { cin >> a[i]; }
	int ten, one; ten = ((int)a[0] - (int)'0') * 10 + (int)a[1] - (int)'0'; one = ((int)a[3] - (int)'0') * 10 + (int)a[4] - (int)'0';
	one += 5;
	if (one >= 60) { ten += 1; one -= 60;  }
	if (ten >= 24) { ten -= 24; }
	if (!(ten / 10)) {
		cout << "0";
	}
	cout << ten<<":";
	if (!(one / 10)) {
		cout << "0";
	}
	cout << one;
 cout << endl;
	return 0;
}

0