Quantcast
Channel: CSDN博客推荐文章
Viewing all articles
Browse latest Browse all 35570

HDU 2033 - 人见人爱 A + B

$
0
0

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2033

#include <stdio.h>

int main(void)
{
    int n, i;
    int t[6];

    scanf("%d", &n);
    
    while (n--)
    {
        for (i = 0 ; i < 6 ; i++)
            scanf("%d", t + i);

        t[1] += (t[2] + t[5]) / 60;
        t[2] = (t[2] + t[5]) % 60;

        t[0] += (t[1] + t[4]) / 60;
        t[1] = (t[1] + t[4]) % 60;

        t[0] += t[3];

        printf("%d %d %d\n", t[0], t[1], t[2]);
    }

    return 0;
}


作者:a1006570862 发表于2013-11-28 1:12:12 原文链接
阅读:82 评论:0 查看评论

Viewing all articles
Browse latest Browse all 35570

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>