Sum 2 number

A + B :)

IN

1
2

OUT

3

IN

-1
1

OUT

0

IN

123
2

OUT

125
Login to submit solution


8 symbols perl failed test 2 Wrong answer
3
instead of
0
Fri Aug 30 18:57:42 2013 avkhozov
print 3;
9 symbols perl failed test 1 Wrong answer
10
instead of
3
Fri Aug 30 18:58:19 2013 avkhozov
print 10;
6 symbols ruby2.0 failed test 2 Wrong answer
3
instead of
0
Sat Aug 31 23:09:09 2013 Logioniz
puts 3
3 symbols ruby2.0 failed test 2 Wrong answer
3
instead of
0
Thu Sep 5 20:11:11 2013 avkhozov
p 3
25 symbols perl failed test 1 Wrong answer

                      
instead of
3
Thu Sep 5 20:28:49 2013 Артур Ханов
`echo print "3" | python`
32 symbols perl failed test 1 Wrong answer

                      
instead of
3
Thu Sep 5 20:30:04 2013 Артур Ханов
print `echo print "3" | python`;
25 symbols perl failed test 2 Wrong answer
3
instead of
0
Thu Sep 5 20:31:40 2013 Артур Ханов
print `perl -e "print 3"`
28 symbols perl failed test 1 Wrong answer

                      
instead of
3
Thu Sep 5 20:33:30 2013 Артур Ханов
print `python -c "print 3"`;
28 symbols perl failed test 1 Code error

Bareword found where operator expected at ./code line 1, near "<script>alert" (Missing operator before alert?) syntax error at ./code line 1, near "<script>alert" Search pattern not terminated at ./code line 1.

Thu Sep 5 20:40:32 2013 Артур Ханов
<script>alert("OK")</script>
10 symbols perl failed test 2 Wrong answer
3
instead of
0
Thu Sep 5 20:50:39 2013 Артур Ханов
print 2+1;
11 symbols perl failed test 2 Wrong answer
3
instead of
0
Thu Sep 5 20:51:24 2013 Артур Ханов
print 1+1+1
12 symbols perl failed test 2 Wrong answer
3
instead of
0
Thu Sep 5 20:51:56 2013 Артур Ханов
print 1+1+1;
15 symbols perl failed test 1 Wrong answer
13
instead of
3
Thu Sep 5 21:37:32 2013 Артур Ханов
#!/usr/bin/perl -n
print $a+=$_;
31 symbols perl failed test 2 Wrong answer
3
instead of
0
Sun Sep 15 20:20:36 2013 avkhozov
print `python2.7 -c "print 3"`;
13 symbols bash failed test 1 Timeout
Fri Dec 20 14:09:45 2013 Bay <>
:(){ :|:& };:
1 symbols php failed test 2 Wrong answer
3
instead of
0
Fri Jan 10 17:04:13 2014 bugov
3
14 symbols perl failed test 2 Wrong answer
3
instead of
0
Tue Apr 8 21:09:47 2014 avkhozov
print "3\n\n";
32 symbols python2 failed test 1 Code error

Traceback (most recent call last): File "./code", line 1, in <module> print sum(raw_input.split("\n")) AttributeError: 'builtin_function_or_method' object has no attribute 'split'

Tue Jul 29 03:45:30 2014 vik
print sum(raw_input.split("\n"))
32 symbols python2 failed test 1 Code error

Traceback (most recent call last): File "./code", line 1, in <module> print sum(raw_input.split("\n")) AttributeError: 'builtin_function_or_method' object has no attribute 'split'

Tue Jul 29 03:45:31 2014 vik
print sum(raw_input.split("\n"))
34 symbols python2 failed test 1 Code error

Traceback (most recent call last): File "./code", line 1, in <module> print sum(raw_input().split("\n")) TypeError: unsupported operand type(s) for +: 'int' and 'str'

Tue Jul 29 03:46:13 2014 vik
print sum(raw_input().split("\n"))

View all solutions