Description

You are given the current time in 24-hour format hh:mm. Find and print the time after a minutes.

Note that you should find only the time after a minutes, see the examples to clarify the problem statement.

You can read more about 24-hour format here https://en.wikipedia.org/wiki/24-hour_clock.

Input

The first line contains the current time in the format hh:mm (0 ≤ hh < 24, 0 ≤ mm < 60). The hours and the minutes are given with two digits (the hours or the minutes less than 10 are given with the leading zeroes).

The second line contains integer a (0 ≤ a ≤ 104) — the number of the minutes passed.

Output

The only line should contain the time after a minutes in the format described in the input. Note that you should print exactly two digits for the hours and the minutes (add leading zeroes to the numbers if needed).

See the examples to check the input/output format.

Sample test(s)
input
23:59
10
output
00:09
input
20:20
121
output
22:21
input
10:10
0
output
10:10
一个简单的模拟
 #include<stdio.h>
//#include<bits/stdc++.h>
#include<string.h>
#include<iostream>
#include<math.h>
#include<sstream>
#include<set>
#include<queue>
#include<map>
#include<vector>
#include<algorithm>
#include<limits.h>
#define inf 0x3fffffff
#define INF 0x3f3f3f3f
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
#define LL long long
#define ULL unsigned long long
using namespace std;
int t;
int n,m;
int sum,ans,flag;
int a,b,c,d;
int main()
{
scanf("%d:%d",&a,&b);
scanf("%d",&n);
while(n--)
{
b++;
if(b==)
{
a++;
b=;
if(a==)
{
a=;
}
}
}
printf("%02d:%02d",a,b);
return ;
}

Educational Codeforces Round 7 B的更多相关文章

  1. [Educational Codeforces Round 16]E. Generate a String

    [Educational Codeforces Round 16]E. Generate a String 试题描述 zscoder wants to generate an input file f ...

  2. [Educational Codeforces Round 16]D. Two Arithmetic Progressions

    [Educational Codeforces Round 16]D. Two Arithmetic Progressions 试题描述 You are given two arithmetic pr ...

  3. [Educational Codeforces Round 16]C. Magic Odd Square

    [Educational Codeforces Round 16]C. Magic Odd Square 试题描述 Find an n × n matrix with different number ...

  4. [Educational Codeforces Round 16]B. Optimal Point on a Line

    [Educational Codeforces Round 16]B. Optimal Point on a Line 试题描述 You are given n points on a line wi ...

  5. [Educational Codeforces Round 16]A. King Moves

    [Educational Codeforces Round 16]A. King Moves 试题描述 The only king stands on the standard chess board ...

  6. Educational Codeforces Round 6 C. Pearls in a Row

    Educational Codeforces Round 6 C. Pearls in a Row 题意:一个3e5范围的序列:要你分成最多数量的子序列,其中子序列必须是只有两个数相同, 其余的数只能 ...

  7. Educational Codeforces Round 9

    Educational Codeforces Round 9 Longest Subsequence 题目描述:给出一个序列,从中抽出若干个数,使它们的公倍数小于等于\(m\),问最多能抽出多少个数, ...

  8. Educational Codeforces Round 37

    Educational Codeforces Round 37 这场有点炸,题目比较水,但只做了3题QAQ.还是实力不够啊! 写下题解算了--(写的比较粗糙,细节或者bug可以私聊2333) A. W ...

  9. Educational Codeforces Round 60 (Rated for Div. 2) - C. Magic Ship

    Problem   Educational Codeforces Round 60 (Rated for Div. 2) - C. Magic Ship Time Limit: 2000 mSec P ...

  10. Educational Codeforces Round 60 (Rated for Div. 2) - D. Magic Gems(动态规划+矩阵快速幂)

    Problem   Educational Codeforces Round 60 (Rated for Div. 2) - D. Magic Gems Time Limit: 3000 mSec P ...

随机推荐

  1. Solr5.5.3的研究之路 ---1、从Mysql导入数据并创建索引

    公司需要用到全文检索,故使用Solr,也是新人一枚,本人查看的前提是Solr已经安装部署成功,我用的服务器是自带的Jetty 1.创建Collection [root@whoami bin]# ./s ...

  2. java中的字符,字节和编码

    1. 编码问题的由来,相关概念的理解 1.1 字符与编码的发展 从计算机对多国语言的支持角度看,大致可以分为三个阶段:   系统内码 说明 系统 阶段一 ASCII 计算机刚开始只支持英语,其它语言不 ...

  3. Maven学习笔记1-牛逼的POM文件

    IDE:integrated development enterprise 集成开发环境: 一.pom文件 POM是项目对象模型(Project Object Model)的简称:maven世界中必须 ...

  4. CSS特性:white-space: nowrap;text-overflow: ellipsis;text-decoration: none

    /*white-space: nowrap; text-overflow: ellipsis; text-decoration: none;*/ /*这三句话必须连着使用, * clip: 当对象内文 ...

  5. JavaWeb面试题 有用

    ajax的原理简单来说通过XmlHttpRequest对象来向服务器发异步请求,从服务器获取数据,然后用JavaScript来操作DOM从而更新页面的局部显示. Ajax的优点: 1.最大的一点是页面 ...

  6. bzoj1787 紧急集合

    传送门 题目 Input Output 分析 看到这个题不难想到倍增LCA,然后我们考虑如何计算.我们分别求出3个点中任意两点的LCA,为了走的步数最少所以肯定是先有两个点相遇然后另一个点走的它们相遇 ...

  7. 本地方法中printf如何传给java--java系统级命名管道

    本地方法中printf如何传给java--java系统级命名管道 摘自:https://blog.csdn.net/dog250/article/details/6007301 2010年11月13日 ...

  8. 打印sql语句

    root->trace hibernate->trace ,然后,改配置 全文搜索:show_sql,将所有的show_sql改为true. 这样,就会显示sql语句了.

  9. Opera福利谷歌

    文章介绍 看到这个文章时候,感觉还可以,之前天行也是酱紫的,但是现在不知道怎么的已经完全用不了了.就试了下这个欧鹏,还可以,朋友有不少需要访问谷歌的,就收藏下了. Opera介绍 Opera浏览器,是 ...

  10. C#字符串要点(复习专用)

    一.字符串 通过string定义一个字符串,或者通过String类来创建对象. 通过new String() 创建有一下几种构造函数(从元数据),以此顺序创建string: // // 摘要: // ...