#include <bits/stdc++.h> using namespace std; int outerspace_time_to_earth_time(int a, int b, int c){ // 自創一個函式計算外星時間轉地球時間 int total_seconds=a*32*16+b*16+c; // 計算總秒數 int earth_seconds=total_seconds*4; // 計算地球時間 return earth_seconds; // 回傳地球時間 } int main(){ int n; cin>>n; while(n--){ //重複n遍 int a,b,c; cin>>a>>b>>c; int earth_seconds=outerspace_time_to_earth_time(a,b,c); // 呼叫函式計算地球時間 int h=earth_seconds/3600; // 計算小時 int m=(earth_seconds%3600)/60; // 計算分鐘 int s=earth_seconds%60; // 計算秒數 cout<<h<<":"<<m<<":"<<s<<endl; } return 0; }