Solution to the problem number 576 of AceptaelReto - 576.

Any questions do not hesitate to contact.


#include <bits/stdc++.h>
using namespace std;

int main(){
    int time;
    while(scanf("%d",&time)==1 && time!=0){
        int sum = 0,num;
        while(scanf("%d",&num)==1 && num!=0) sum+=num;
        sum*=time;
        int hours = sum/3600;
        sum-=(hours*3600);
        int minutes = sum/60;
        sum-=(minutes*60);
        printf("%02d:%02d:%02d\n",hours,minutes,sum);
    }
    return 0;
}

Don't miss anything.

Keep in touch with Isaac Lozano Osorio!