Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace Exam
- {
- using System;
- using System.Linq;
- public class SinoTheWalker
- {
- static void Main()
- {
- var nums = Console.ReadLine().Split(':').Select(int.Parse).ToArray();
- long seconds = nums[2] + 60 * nums[1] + 3600 * nums[0];
- long secondsToAdd = long.Parse(Console.ReadLine()) * long.Parse(Console.ReadLine());
- seconds += secondsToAdd;
- var secs = seconds % 60;
- var mins = (seconds / 60) % 60;
- var hours = (seconds / 60 / 60) % 24;
- Console.WriteLine("Time Arrival: {0:d2}:{1:d2}:{2:d2}", hours, mins, secs);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement