Programming Fundamentals - 19. Thea the Photographer.
Пичове,
Някакви идеи защо получавам 70/100?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _19.The_the_Photographer
{
class Program
{
static void Main(string[] args)
{
int n = int.Parse(Console.ReadLine());
int ft = int.Parse(Console.ReadLine());
int ff = int.Parse(Console.ReadLine());
int ut = int.Parse(Console.ReadLine());
double percentage = (ff / 100.00);
double useful = Math.Ceiling(n * percentage );
double alltimeneeded = (n * ft) + (useful * ut);
TimeSpan t = TimeSpan.FromSeconds(alltimeneeded);
string answer = string.Format("{0:D1}:{1:D2}:{2:D2}:{3:D2}", t.Days, t.Hours, t.Minutes, t.Seconds);
Console.WriteLine(answer);
}
}
}