QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#138169 | #2928. Espresso! | HANABANANA | WA | 1ms | 3500kb | C++17 | 551b | 2023-08-11 03:26:42 | 2023-08-11 03:26:44 |
Judging History
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;
}
详细
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'