QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#132231#2928. Espresso!heshamoomarWA 0ms3492kbC++14381b2023-07-29 05:06:412023-07-29 05:06:42

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:06:42]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3492kb
  • [2023-07-29 05:06:41]
  • 提交

answer

#include<iostream>
using namespace std;

int main(){
    int n,s;
    cin>>n>>s;
    int total=0;
    while (n--){
        string st;cin>>st;
        if(st.size()==1){
            total+=st[0]-'0';
        }
        else{
            total+=st[0]-'0';
            total+=1;
        }
    }

    (total%s)-1==-1?cout<<0:cout<<(total%s)-1;


    return 0;
}//

詳細信息

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3492kb

input:

1 10
4L

output:

4

result:

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