51412023-04-20 03:26:43tomi7Bájital (80 pont)cpp11Wrong answer 12/8037ms5736 KiB
// Source: https://usaco.guide/general/io

#include <bits/stdc++.h>
using namespace std;

/*long long lko(unsigned long long n, unsigned long long m){
	if(n%m==0 || m%n==0){
		return min(n, m);
	}
	if(n>m){
		return lko(n%m, m);
	}else{
		return lko(m%n, n);
	}
}*/

int main() {
	int n;
	int x;
	cin>>n>>x;
	vector<int> a(n);
	int valasz;
	int es=0;
	for(int i=0;i<n;i++){
		cin>>a[i];
		es+=a[i]/x;
		valasz+=a[i]%x;
	}
	cout<<min(es, valasz)<<'\n';
}
SubtaskSumTestVerdictTimeMemory
base12/80
1Accepted0/03ms1812 KiB
2Wrong answer0/03ms2060 KiB
3Wrong answer0/23ms2292 KiB
4Wrong answer0/23ms2504 KiB
5Wrong answer0/23ms2644 KiB
6Wrong answer0/23ms2860 KiB
7Wrong answer0/43ms3076 KiB
8Wrong answer0/43ms3208 KiB
9Wrong answer0/237ms4108 KiB
10Wrong answer0/237ms4180 KiB
11Wrong answer0/237ms4312 KiB
12Wrong answer0/237ms4652 KiB
13Wrong answer0/237ms4652 KiB
14Wrong answer0/237ms4876 KiB
15Wrong answer0/237ms4964 KiB
16Wrong answer0/237ms5172 KiB
17Wrong answer0/237ms5160 KiB
18Wrong answer0/237ms5288 KiB
19Wrong answer0/237ms5376 KiB
20Wrong answer0/237ms5440 KiB
21Wrong answer0/237ms5440 KiB
22Wrong answer0/237ms5528 KiB
23Wrong answer0/43ms4728 KiB
24Accepted4/42ms4728 KiB
25Wrong answer0/43ms4892 KiB
26Accepted4/423ms5664 KiB
27Wrong answer0/437ms5552 KiB
28Wrong answer0/437ms5556 KiB
29Wrong answer0/437ms5540 KiB
30Accepted2/237ms5636 KiB
31Accepted2/237ms5736 KiB
32Wrong answer0/237ms5544 KiB
33Wrong answer0/237ms5544 KiB