QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#132232#2928. Espresso!ak19111911WA 0ms3736kbC++20505b2023-07-29 05:57:152023-07-29 05:57:18

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-07-29 05:57:18]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3736kb
  • [2023-07-29 05:57:15]
  • 提交

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;
}

詳細信息

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'