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)
- {
- int N = int.Parse(Console.ReadLine());
- int FT = int.Parse(Console.ReadLine());
- int FF = int.Parse(Console.ReadLine());
- int UT = int.Parse(Console.ReadLine());
- int hours=0;
- int minutes=0;
- int day = 0;
- int first = N * FT;
- int second = (int)Math.Ceiling(((double)N * (FF / 100.0f)) );
- second = second * UT;
- int 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