oj mrJudge
Toggle navigation
  • Login
    • Forget Password
      Login
User Image

Hello, Stranger

Guest
  • Analysis Mode
  • Problems
    • All Problems
    • Latest Problems
  • Join Us Now
  • Registration
  • Contact Us
  • Infomation
  • About
    • Terms of Use
    • Technical Specifications
    • Credits

sumscore Batch , stdin/stdout

Registered Users Only

Please login to utilize this feature.

Do note that this website only supports submissions in C++.

sumscore.html

A teacher has just finished marking exam scripts and is required to total the score for each exam script. However, he is lazy to count the total amount of questions in the script itself. He wants you to write a program for him to find out the total score of each exam script by just typing individual scores for each question into the program, space separated. An "-1" marks the end of the scores of the script.

Do not add the "-1" that signifies the end of the integers

You may assume that all the scores are non-negative integers

You may also assume that there are no more than 100 000 numbers in each testcase

Sample Input

1 0 1 1 0 0 1 2 1 -1

Sample Output

7

Tags

Syntax

Subtasks and Limits

Subtask Score #TC Time Memory Scoring
1100201s32MBAverage
2011s32MBAverage

Judge Compile Command

g++-8 ans.cpp -o sumscore -Wall -Wshadow -static -O2 -lm -m64 -s -w -std=gnu++17 -fmax-errors=512

Accepted Submissions

subIDUserTimeMax Time

Past Submissions

subIDUserTimeScore
mrJudge 09.05.20
Copyright © 2020 mrJudge. All rights reserved.