题解 | #牛牛的时钟#
牛牛的时钟
https://www.nowcoder.com/practice/36fd5f6b6236452f99f0ea59cd3447e0
#include <stdio.h> void show(int sum){ int h,min,s; sum=sum%(24*60*60); h=sum/3600; min=(sum/60)%60; s=sum%60; printf("%d %d %d\n",h,min,s); } int main() { int n; scanf("%d",&n); int arr[n]; int sum=0; for(int i=0;i<n;i++){ scanf("%d",&arr[i]); sum=sum+arr[i]; show(sum); } return 0; }