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


31 symbols pyth
Wed Nov 23 18:42:32 2016 Sait2000
@[tZ1 4018 1981 365k1939Z)%Cz25
48 symbols pyth
Sun Nov 6 04:55:48 2016 Sait2000
s[*365=G%hA.D-i_tJrz7K12 3K50/G4/+5*H306T-hJ3581
55 symbols pyth
Sun Nov 6 04:56:21 2016 Sait2000
s[*365hA.D-i_tJrz7K12 3K-/G4=/G100/G4/+5*H306T-hJ734066
56 symbols pyth
Sun Nov 6 04:47:57 2016 Sait2000
-s[*365hA.D-i_tJrz7K12 3K-/G4=/G100/G4/+5*H306ThJ)734066
57 symbols pyth
Sun Nov 6 04:29:00 2016 Sait2000
-s[*365hA.D-i_tJrz7K12 3K-/G4/G100/G400/+5*H306ThJ)734066
59 symbols bash
Sun Nov 6 05:09:21 2016 Sait2000
sed '/3/c1981
/4/c1939
/8/c-1
/02/c4018
/01/c365
/^2/c1
c0'
60 symbols pyth
Sat Nov 5 19:30:22 2016 Sait2000
v%"__import__('datetime').date(*%s).toordinal()-733760"`_rz7
85 symbols python3
Sat Nov 5 19:40:00 2016 Sait2000
from datetime import*
print(date(*map(int,input().split()[::-1])).toordinal()-733760)
88 symbols python2
Sat Nov 5 19:38:48 2016 Sait2000
from datetime import*
print date(*map(int,raw_input().split())[::-1]).toordinal()-733760

View all solutions