62,615
社区成员
发帖
与我相关
我的任务
分享
public class Test{
public static void main(String[] args) {
for(int h=0;h<120;h+=5) {
for(int m=0;m<60;m++) {
for(int s=0;s<60;s++) {
if(((h>60)?h-60:h) == m && m== s) System.out.println(h/5+":"+m+":"+s);
}
}
}
}
}
public class Test{
public static void main(String[] args) {
for(int h=0;h<120;h+=5) {
for(int m=0;m<60;m++) {
for(int s=0;s<60;s++) {
if(((h>=60)?h-60:h) == m && m== s) System.out.println(h/5+":"+m+":"+s);
}
}
}
}
}
public class GetTime {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
int ch =0;
int h = 0;
int m = 0;
int s = 0;
StringBuffer sb = new StringBuffer();
for(h=0;h<12;h++){
for(m=0;m<60;m++){
for(s=0;s<60;s++){
ch = h*5+m/12;
System.out.println(m/12);
if(m==s&&ch==m)
sb.append(","+h+":"+m+":"+s);
}
}
}
System.out.println("time="+sb.toString().substring(1));
}
}