HDU-2033(人见人爱A+B)

来源:互联网 发布:电脑监控软件 编辑:程序博客网 时间:2024/06/05 06:37
题目链接:https://vjudge.net/problem/HDU-2033
#include <iostream>#include <cstdio>#include <cstring>#include <algorithm>using namespace std;int main(){    int h, m, s;    int t;    scanf("%d", &t);    while(t--)    {        int a1, b1, c1, a2, b2, c2;        scanf("%d%d%d%d%d%d", &a1, &b1, &c1, &a2, &b2, &c2);        s = (c1 + c2)%60;        m = ((b1 + b2) + (c1 + c2)/60)%60;        h = ((a1 + a2) + (b1 + b2 + (c1 + c2)/60)/60);        printf("%d %d %d\n", h, m, s);    }    return 0;}
原创粉丝点击