121942024-12-08 13:57:42SRobÚthasználati díj (75 pont)cpp17Wrong answer 0/7518ms568 KiB
// uthasznalat.cpp : Defines the entry point for the console application.
//

#include <iostream>
using namespace std;


int main()
{
	int varosDb, K;
	cin >> varosDb >> K;
	int seged;
	int egyDb = 0;
	for (int i = 0; i < varosDb; i++)
	{
		cin >> seged;
		if (seged== 1)
		{
			egyDb++;
		}
	}

	int megoldas = 0;
	megoldas = (egyDb-K+1)*(K-1)+(K*(1+K)/2 - K);
}

SubtaskSumTestVerdictTimeMemory
base0/75
1Wrong answer0/01ms320 KiB
2Wrong answer0/01ms320 KiB
3Wrong answer0/018ms568 KiB
4Wrong answer0/51ms500 KiB
5Wrong answer0/51ms320 KiB
6Wrong answer0/51ms320 KiB
7Wrong answer0/51ms320 KiB
8Wrong answer0/51ms320 KiB
9Wrong answer0/51ms320 KiB
10Wrong answer0/51ms320 KiB
11Wrong answer0/51ms500 KiB
12Wrong answer0/51ms320 KiB
13Wrong answer0/51ms320 KiB
14Wrong answer0/517ms568 KiB
15Wrong answer0/517ms520 KiB
16Wrong answer0/517ms568 KiB
17Wrong answer0/517ms452 KiB
18Wrong answer0/517ms568 KiB