class Yugi{
private static void print(int h,int m,int s){
int ss = h * 60 * 60 + m * 60 + s;
System.out.format("%d小时%d分%d秒等于%d秒%n",h,m,s,ss);
}
private static void print(int s){
int h = s/60/60;
int m = s/60%60;
int ss = s%60;
System.out.format("%d秒等于%d小时%d分%d秒%n", s,h,m,ss);
}
public static void main(String[] args){
print(1,28,42);
print(9999);
}
}