题解 | #时间转换#
时间转换
https://www.nowcoder.com/practice/c4ae7bcac7f9491b8be82ee516a94899
use std::io; fn main() { let mut input = String::new(); io::stdin().read_line(&mut input).unwrap(); let seconds = input.trim().parse::<u32>().unwrap(); let hours = seconds / 3600; let remaining_seconds = seconds % 3600; let minutes = remaining_seconds / 60; let remaining_seconds = remaining_seconds % 60; println!("{} {} {}", hours, minutes, remaining_seconds); }