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

diskettes Batch , stdin/stdout

Registered Users Only

Please login to utilize this feature.

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

diskettes.html

Problem Description

Peanut has two different piles of diskettes he wants to throw away (who needs diskettes nowadays). His first pile contains A diskettes. His second pile consists of B diskettes. Given A and B as a string, return the total number of diskettes Peanut has to throw away.

Your program is required to implement the following functions:

  1. string throwAway(string A, string B), which when given A and B, returns the total number of diskettes Peanut has to throw away.

To assist you in your incredible quest, you will be provided with the following functions:
  1. long long int StringToInt(string), which converts a string to an integer.
  2. string IntToString(long long int), which converts an integer to a string.

Input

Your function will be given two integers, A and B.

Output

Your function should return the total number of diskettes Peanut has to throw away.

Limits

Subtask 1 (18%): 1 <= A,B <= 1 000 000 000
Subtask 2 (34%): 1 <= A,B <= 1 000 000 000 000 000
Subtask 3 (48%): 1 <= A,B <= 1 000 000 000 000 000 000 000

Sample Input 1

3 4

Sample Output 1

7

Sample Input 2

12 34

Sample Output 2

46

Tags

Ad Hoc, Bignum

Subtasks and Limits

Subtask Score #TC Time Memory Scoring
118501s64MBMinimum
234501s64MBMinimum
348501s64MBMinimum
4021s64MBMinimum

Attachments

Attachment Filesize Last Updated
diskettes.h154B27 Jul 2013, 12:40:02
grader.cpp415B27 Jul 2013, 12:39:57
ans.cpp94B27 Jul 2013, 12:40:05

Judge Compile Command

g++-8 ans.cpp grader.cpp -o diskettes -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.