結果

問題 No.525 二度寝の季節
ユーザー MNghr
提出日時 2017-06-09 22:30:28
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 541 bytes
コンパイル時間 412 ms
コンパイル使用メモリ 56,428 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-22 15:14:43
合計ジャッジ時間 1,424 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 32 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main(){
	int x;
	string unko;

	cin >> unko;

	for(int i = 0;i < 5;++i){
		if( i != 2)
			unko[i]-=48;
	}

	unko[4] += 5;
	if(unko[4] > 9){
		unko[4] -=10;
		unko[3] += 1;
	}

	if(unko[3] >= 6){
		unko[3] -= 6;
		unko[1] += 1; 
	}

	if(unko[1] > 10){
		unko[1] -= 10;
		unko[0] += 1;
	}

	if(unko[0] * 10 + unko[1] >= 24){
		unko[0] -= 2;
		unko[1] -= 4;
	}

	for(int i = 0; i < 5;++i){
		if(i!= 2)
			unko[i]+=48;
		cout << unko[i];
	}

	cout <<  endl;



}
0