Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace P05_Special_Numbers
- {
- class Program
- {
- static void Main(string[] args)
- {
- //ulong n = ulong.Parse(Console.ReadLine());
- ulong Pictures = ulong.Parse(Console.ReadLine());
- ulong AmountOfTime = ulong.Parse(Console.ReadLine());
- ulong percentage = ulong.Parse(Console.ReadLine());
- ulong NeededTime = ulong.Parse(Console.ReadLine());
- decimal UsefulPicrure = Math.Ceiling(Pictures * (decimal)percentage / 100);
- //200 х 8 % / 100 =
- ulong totalTime = Pictures * (ulong)AmountOfTime + (ulong)UsefulPicrure * (ulong)NeededTime;
- string final = Convert.ToString(totalTime);
- TimeSpan t = TimeSpan.FromSeconds(Convert.ToDouble(final));
- Console.WriteLine(t.ToString(@"d\:hh\:mm\:ss"));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement