解题思路:
注意事项:
参考代码:
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner=new Scanner(System.in);
int l=scanner.nextInt();
while(l--!=0) {
int n=scanner.nextInt();
String str="";
int h=n/(60*60);
if(h<10) {
str+="0";
}
str+=h+":";
int m=n%(60*60)/60;
if(m<10) {
str+="0";
}
str+=m+":";
int s=n%60;
if(s<10) {
str+="0";
}
str+=s;
System.out.println(str);
}
}
}
0.0分
0 人评分
陶陶摘苹果 (C语言代码)浏览:1607 |
C语言程序设计教程(第三版)课后习题9.2 (C语言代码)浏览:556 |
1009题解浏览:752 |
回文数字 (C语言代码)浏览:2510 |
1012题解浏览:870 |
循环入门练习6 (C语言代码)浏览:970 |
数列排序 (C语言代码)浏览:616 |
C语言程序设计教程(第三版)课后习题5.5 (C语言代码)浏览:810 |
C语言训练-斐波纳契数列 (C语言代码)浏览:511 |
C语言程序设计教程(第三版)课后习题5.6 (C语言代码)浏览:533 |