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