Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Numerics;
- using System.Text;
- namespace CSharpDemos
- {
- class Program
- {
- static void Main(string[] args)
- {
- int pictures = int.Parse(Console.ReadLine());
- int filterTime = int.Parse(Console.ReadLine());
- int filterFactor = int.Parse(Console.ReadLine());
- int uploadTime = int.Parse(Console.ReadLine());
- int filteredPictures = (int)Math.Ceiling(pictures * filterFactor / 100.0);
- long timeForFiltering = (long)pictures * filterTime;
- long timeForUpload = (long)filteredPictures * uploadTime;
- long totalTime = timeForFiltering + timeForUpload;
- TimeSpan time = TimeSpan.FromSeconds(totalTime);
- string format = time.ToString(@"d\:hh\:mm\:ss");
- Console.WriteLine(format);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment