84932024-01-19 08:54:57TortelliniJrVirágos rét (50 pont)csharpWrong answer 42/5082ms36700 KiB
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ViragosRetRevised
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] inp = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int n = inp[0];
            int f = inp[1];
            inp = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int g = inp.Sum();
            int sol = 0;
            for (int i = 1; i <= g - f + 1; i++)
            {
                sol += i;
            }
            Console.WriteLine(sol);
            Console.ReadLine();
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base42/50
1Accepted0/032ms22012 KiB
2Accepted0/032ms22712 KiB
3Accepted0/078ms33924 KiB
4Accepted2/232ms23624 KiB
5Accepted2/230ms23856 KiB
6Accepted2/230ms23628 KiB
7Accepted3/330ms23276 KiB
8Accepted3/334ms23880 KiB
9Accepted3/334ms24112 KiB
10Accepted2/237ms25416 KiB
11Accepted3/337ms25580 KiB
12Accepted2/237ms25288 KiB
13Accepted3/337ms25164 KiB
14Accepted2/279ms35168 KiB
15Wrong answer0/279ms35344 KiB
16Accepted3/381ms35708 KiB
17Accepted3/379ms35520 KiB
18Wrong answer0/381ms36628 KiB
19Accepted3/379ms36700 KiB
20Accepted3/381ms36668 KiB
21Accepted3/382ms36604 KiB
22Wrong answer0/381ms36544 KiB