Logistic Exam 18 november evening 2016
по някаква причина дава 40/100 точки ,а всичко си е нормално
помогнете да я оправя за judge .
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _04.Logistic
{
class Program
{
static void Main(string[] args)
{
int weightForTransport = int.Parse(Console.ReadLine());
int microbus = 0;
int truck = 0;
int train = 0;
int alltons = 0;
for (int i = 0; i < weightForTransport; i++)
{
int tons = int.Parse(Console.ReadLine());
if (tons<=3)
{
microbus+=tons;
alltons += tons;
}
else if (tons>3 && tons<11)
{
truck+=tons;
alltons += tons;
}
else if (tons>12)
{
train+=tons;
alltons += tons;
}
}
double middleTon = (double)(microbus * 200 + truck * 175 + train * 120) / alltons;
Console.WriteLine($"{middleTon:f2}");
Console.WriteLine($"{(double)microbus*100 / alltons:f2}%");
Console.WriteLine($"{(double)truck*100 / alltons:f2}%");
Console.WriteLine($"{(double)train*100 / alltons:f2}%");
}
}
}