C# int N = Convert.toInt32(Console.ReadLine()); int sum = 0; for (int n = 0; n < N; n++) { int a = Convert.toInt32(Console.ReadLine()); if (a < 15) { sum = sum + a; } } if (sum > 60) { Console.WriteLine("Yes"); } else { Console.WriteLine("No"); } Console.ReadKey();
int N = Convert.toInt32(Console.ReadLine());
int sum = 0;
for (int n = 0; n < N; n++)
{
int a = Convert.toInt32(Console.ReadLine());
if (a < 15)
{
sum = sum + a;
}
}
if (sum > 60)
{
Console.WriteLine("Yes");
}
else
{
Console.WriteLine("No");
}
Console.ReadKey();