QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#138169#2928. Espresso!HANABANANAWA 1ms3500kbC++17551b2023-08-11 03:26:422023-08-11 03:26:44

Judging History

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

  • [2023-08-11 03:26:44]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3500kb
  • [2023-08-11 03:26:42]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
int main ()
{
    int n,s;
    cin>>n>>s;
    int sum=0;
    for(int i=0;i<n;i++)
    {
        string v;
        cin>>v;
        if (v.size()>1)
        {
            char c=v[0];
            int x= v[0]-'0';
            sum+=(x+1);
        }
        else
        {
            char c=v[0];
            int x=v[0]-'0';
            sum+=x;
        }

    }
    if (sum==s)
    {
        cout<<"0"<<endl;
    }
    else
    {
        cout<<sum/s;
    }
   
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3488kb

input:

1 10
4L

output:

0

result:

ok single line: '0'

Test #2:

score: -100
Wrong Answer
time: 1ms
memory: 3500kb

input:

15 10
3
2L
3
1
3
2L
3
4
3L
2L
3
1
4
2
4L

output:

4

result:

wrong answer 1st lines differ - expected: '5', found: '4'