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 _19.Thea_The_Photographer
- {
- class Program
- {
- static void Main(string[] args)
- {
- int picturesTaken = int.Parse(Console.ReadLine());
- int filterTimePerPicture = int.Parse(Console.ReadLine());
- int percentage = int.Parse(Console.ReadLine());
- int uploadTimePerPicture = int.Parse(Console.ReadLine());
- if ((picturesTaken >= 0 && picturesTaken <= 1000000) &&
- (filterTimePerPicture >= 0 && filterTimePerPicture <= 100000) &&
- (percentage >= 0 && percentage <= 100) &&
- (uploadTimePerPicture >= 0 && uploadTimePerPicture <= 100000))
- {
- int timeToFilterInSeconds = picturesTaken * filterTimePerPicture;
- double totalPictures = Math.Ceiling((picturesTaken * (percentage * 0.01)));
- int TimeToUpload = (int)totalPictures * uploadTimePerPicture + timeToFilterInSeconds;
- TimeSpan time = TimeSpan.FromSeconds(TimeToUpload);
- string totalTime = time.ToString(@"d\:hh\:mm\:ss");
- Console.WriteLine(totalTime);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement