QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#132232 | #2928. Espresso! | ak19111911 | WA | 0ms | 3736kb | C++20 | 505b | 2023-07-29 05:57:15 | 2023-07-29 05:57:18 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std ;
#define ll long long
int main () {
double n,s;cin>>n>>s;
double sum=0;
string a;
for(int i=0;i<n;i++) {
cin >> a;
int d=(a[0]-'0');
if(a.size()>1){
sum+=d;
sum++;
}else{
sum+=d;
}
}
sum-=s;
// if(sum<0)cout<<"0\n";
// else
cout<<::ceil(sum/s)<<endl;
//cout<<((int)sum/s!=sum/s?(int)sum/s+1:sum/s)<<endl;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3736kb
input:
1 10 4L
output:
-0
result:
wrong answer 1st lines differ - expected: '0', found: '-0'