DAY AFTER WEDDING <3

Each ICPC problem set has at least one easy question.
This is (probably) that problem... (if you know the required technique).

19 December 2009 is the wedding day of Steven and Grace.
It is a very special day for them.
Steven likes to count how many days have elapsed since his wedding day.
So, on 20 December 2009: 1 day has elapsed, on 19 December 2010: 365 days have elapsed, etc.
Steven can of course code this program himself, but he wants to know if you can code the solution too?

IN

18 12 2009

OUT

-1

IN

19 12 2020

OUT

4018

IN

23 5 2015

OUT

1981

IN

11 4 2015

OUT

1939

IN

19 12 2010

OUT

365

IN

20 12 2009

OUT

1

IN

19 12 2009

OUT

0
Login to submit solution


60 symbols pyth failed test 1 Wrong answer
-2
instead of
-1
Sat Nov 5 19:30:01 2016 Sait2000
v%"__import__('datetime').date(*%s).toordinal()-733761"`_rz7
84 symbols python2 failed test 1 Code error

Traceback (most recent call last): File "./code", line 2, in <module> print date(*map(int,input().split())[::-1]).toordinal()-733760 File "<string>", line 1 18 12 2009 ^ SyntaxError: invalid syntax

Sat Nov 5 19:37:39 2016 Sait2000
from datetime import*
print date(*map(int,input().split())[::-1]).toordinal()-733760
57 symbols perl failed test 1 Code error

Bareword found where operator expected at ./code line 1, near "*365hA" (Missing operator before hA?) Number found where operator expected at ./code line 1, near "i_tJrz7K12 3" (Do you need to predeclare i_tJrz7K12?) Bareword found where operator expected at ./code line 1, near "3K" (Missing operator before K?) Operator or semicolon missing before *H306ThJ at ./code line 1. Ambiguous use of * resolved as operator * at ./code line 1. Number found where operator expected at ./code line 1, near ")734066" (Missing operator before 734066?) syntax error at ./code line 1, near "*365hA" Unknown regexp modifier "/G" at ./code line 1, at end of line Unknown regexp modifier "/1" at ./code line 1, at end of line Unknown regexp modifier "/0" at ./code line 1, at end of line Unknown regexp modifier "/0" at ./code line 1, at end of line Missing right curly or square bracket at ./code line 1, at end of line Execution of ./code aborted due to compilation errors.

Sun Nov 6 04:28:51 2016 Sait2000
-s[*365hA.D-i_tJrz7K12 3K-/G4/G100/G400/+5*H306ThJ)734066

View all solutions