public class Test1 {
public static void main(String args[]) throws IOException {
Scanner time = new Scanner(System.in);
System.out.println("请输入一个整数!");
int t, second, mm, hour, day;
t = time.nextInt();
if(t<0){
System.out.println("输入不正确,请重新输入!");
System.exit(0);
}
if (t >= 3600 * 24) // 判断天数
{
day = t / (3600 * 24);
t = t - day * (3600 * 24);
System.out.print(day + "天");
}
if (3600 * 24 > t && t > 3600) // 判断小时
{
hour = t / 3600;
t = t - hour * 3600;
System.out.print(hour + "小时");
}
if (t < 3600 && t > 60) // 判断分钟3
{
mm = t / 60;
t = t - mm * 60;
System.out.print(mm + "分钟");
}
if (60 > t && t > 0) // 判断秒
{
second = t;
System.out.print(second + "秒");
}
time.close();
}