216362026-01-13 17:35:01algoproBájital (80 pont)cpp17Wrong answer 12/8041ms2076 KiB
// UUID: b556955c-73ec-4d69-97a2-f6f65f7149cd
#include <bits/stdc++.h>
using namespace std;
using ll = long long;

int main() {
	ll n, x;
	cin >> n >> x;
	vector <ll> alap(n+1);
	for ( ll i = 1; i <= n; i++ ){
		cin >> alap[i];
	}
	vector <ll> bajital(n+1);
	bajital[0] = 0;
	ll maradek = 0;
	for ( ll i = 1; i <= n; i++ ){
		bajital[i] = bajital[i-1] + alap[i]/x;
		maradek+= alap[i] % x;
	}
	ll sum = bajital[n];
	while ( sum > maradek ){
		sum--;
	}
	cout << sum << "\n";
}
SubtaskSumTestVerdictTimeMemory
base12/80
1Accepted0/01ms500 KiB
2Wrong answer0/01ms316 KiB
3Wrong answer0/21ms500 KiB
4Wrong answer0/21ms316 KiB
5Wrong answer0/21ms316 KiB
6Wrong answer0/21ms316 KiB
7Wrong answer0/42ms316 KiB
8Wrong answer0/42ms316 KiB
9Wrong answer0/241ms1964 KiB
10Wrong answer0/241ms1960 KiB
11Wrong answer0/239ms1964 KiB
12Wrong answer0/239ms1976 KiB
13Wrong answer0/241ms1988 KiB
14Wrong answer0/241ms1960 KiB
15Wrong answer0/241ms1976 KiB
16Wrong answer0/241ms1844 KiB
17Wrong answer0/241ms1844 KiB
18Wrong answer0/239ms2076 KiB
19Wrong answer0/241ms1844 KiB
20Wrong answer0/239ms1940 KiB
21Wrong answer0/241ms1844 KiB
22Wrong answer0/241ms1844 KiB
23Wrong answer0/41ms316 KiB
24Accepted4/41ms508 KiB
25Wrong answer0/41ms316 KiB
26Accepted4/425ms1956 KiB
27Wrong answer0/439ms1968 KiB
28Wrong answer0/441ms1984 KiB
29Wrong answer0/441ms1960 KiB
30Accepted2/241ms1844 KiB
31Accepted2/239ms1964 KiB
32Wrong answer0/241ms1964 KiB
33Wrong answer0/241ms1844 KiB