Advertisement
koksibg

Thea_the_Photographer

Oct 4th, 2017
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.87 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Thea_the_Photographer
  8. {
  9.     class Thea_the_Photographer
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int N = int.Parse(Console.ReadLine());
  14.             int FT = int.Parse(Console.ReadLine());
  15.             int FF = int.Parse(Console.ReadLine());
  16.             int UT = int.Parse(Console.ReadLine());
  17.             double percentage = FF / 100.0;
  18.             int uploadPictures = (int)Math.Ceiling(N * percentage);
  19.             long updatePictures = N * (long)FT;
  20.             long uploadedPictures = uploadPictures * (long)UT;
  21.             long totalPictures = updatePictures + uploadedPictures;
  22.             Console.WriteLine(TimeSpan.FromSeconds(totalPictures).ToString(new string('d', 1) + @"\:hh\:mm\:ss"));
  23.         }
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement