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 _19.Thea_The_Photographer
- {
- class Program
- {
- static void Main(string[] args)
- {
- var pictureCount = int.Parse(Console.ReadLine());
- var singlePictureFilterTimeSeconds = int.Parse(Console.ReadLine());
- var filterPercentage = int.Parse(Console.ReadLine());
- var singlePictureUploadTime = int.Parse(Console.ReadLine());
- var filterTimeSecond = (long)pictureCount * singlePictureFilterTimeSeconds;
- var pictureToUploadCount = (long)Math.Ceiling(pictureCount * (filterPercentage / 100d));
- var uploadTimeSeconds = pictureToUploadCount * singlePictureUploadTime;
- var totalTimeNeededSeconds = filterTimeSecond + uploadTimeSeconds;
- var totalTimeNeededTimeSpan = TimeSpan.FromSeconds(totalTimeNeededSeconds);
- Console.WriteLine($"{totalTimeNeededTimeSpan.ToString(@"d\:hh\:mm\:ss")}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment