题解 | 时间转换

时间转换

https://www.nowcoder.com/practice/c4ae7bcac7f9491b8be82ee516a94899

using System;
public class Program {
    public static void Main() {
        int seconds = int.Parse(Console.ReadLine());
        int hour = seconds / 3600;
        int minute = (seconds % 3600) / 60;
        int second = seconds - (hour * 3600) - (minute * 60);
        Console.WriteLine("{0} {1} {2}",hour,minute,second);
    }
}

全部评论

相关推荐

点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务