Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace SoftUni
- {
- class Program
- {
- static void Main(string[] args)
- {
- ulong N = ulong.Parse(Console.ReadLine());
- ulong FT = ulong.Parse(Console.ReadLine());
- ulong FF = ulong.Parse(Console.ReadLine());
- ulong UT = ulong.Parse(Console.ReadLine());
- ulong hours=0;
- ulong minutes=0;
- ulong day = 0;
- ulong first = N * FT;
- ulong second = (ulong)Math.Ceiling((N * (FF / 100.0)) );
- second = second * UT;
- ulong seconds = first + second;
- if (seconds >= 86400) {
- day = seconds / 86400;
- seconds -= 86400*day;
- }
- if(seconds>=3600)
- {
- hours = seconds / 3600;
- seconds -= 3600 * hours;
- }
- if(seconds>=60)
- {
- minutes = seconds / 60;
- seconds -= 60 * minutes;
- }
- Console.WriteLine($"{day:0}:{hours:00}:{minutes:00}:{seconds:00}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement