結果

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

ソースコード

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] >= 2 && unko[1] >= 4){
		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