APLUSB2 - A plus B

no tags 

Given 2 integers, A and B, find their sum. Beware: There are no limits on A and B

Input

Two integers up to 100000 digits in length

Output

Output their sum

Example

Input:
1
4

Output:
5

hide comments
Vrian7: 2012-10-07 20:49:24

The problem not this outlined complete, there are negative numbers. be careful...

Lomby Whitetail: 2011-07-29 16:20:44

Could the numbers be within the program? Or do they have to be issued through input? (I'm using a Cray XM-P for these programming excersises, and the only way to do it is in it's assembly. The simpler the better)

CHICO_PEPSI: 2010-11-07 15:23:34

place
someone tell me if you can RECEIVE numbers with signs for entrances, help me in this thanks

nishat farhan: 2010-01-01 17:04:27

is it possible to receive 100000 digits number in an array having 100001 elements? is it possible? or do i have to use dynamic memory allocation?
and at last but not least, all two integers are positive, aren't those? any chance of having negative integers in test cases?

numerix: 2009-04-18 13:42:58

I would prefer it to open it again for python/ruby/java. As it is in tutorial section it gives no points anyway and it would be a real task in those languages to get it faster.

Saravannan Shaan: 2009-04-16 23:30:53

Aww, didn't realize PYTH/RUBY could process huge numbers as ints. C++ users actually had to use strings.

SALVO: 2009-04-16 23:30:53

oh wow....a difference of 20 secs between the C/C++ and PYTHON ..i didn't expect such a large differnce only due to I/O :)

Last edit: 2009-04-14 16:08:37
Saravannan Shaan: 2009-04-16 23:30:53

Any suggestions as to what I should put the time limit at? I rejudged yours and it passed now! =)

Edit: For now it's at 60 seconds for the last case and 3 seconds for everything else.

Last edit: 2009-04-13 23:55:35
SALVO: 2009-04-16 23:30:53

You should increase the time limit for other languages (because their I/O is much slower).

Last edit: 2009-04-13 08:30:00
Saravannan Shaan: 2009-04-16 23:30:53

I guess I should've highlighted "no limits" =) Just wanted to let people think a bit.


Added by:Saravannan Shaan
Date:2009-04-09
Time limit:1s-60s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: C99 ERL JAVA JS-RHINO NODEJS PERL6 PYTHON RUBY VB.NET
Resource:Classic