#35893: I born in 20/04/1889 and die on 30/04/1945. How old I was before I suicide in the Berlin undergroubd bunker under the attacks of the Allies countries? Use this code to find out!


raphaelchu0205@gmail.com (Raphael)

學校 : 不指定學校
編號 : 181268
來源 : [125.230.71.195]
最後登入時間 :
2024-01-22 09:11:15
d041. 11219 - How old are you? -- UVa11219 | From: [125.230.91.106] | 發表日期 : 2023-06-22 16:31

S1=""
S2=""
S3=""
L1=[]
L2=[]
a=0
for r_i in range(int(input())):
    S1=input()
    S2=input()
    S3=input()
    L1=S2.split("/")
    L2=S3.split("/")
    for r_j in range(3):
        L1[r_j]=int(L1[r_j])
        L2[r_j]=int(L2[r_j])
    if L1[1]>L2[1]:
        a=L1[2]-L2[2]
    elif L1[1]==L2[1]:
        if L1[0]>=L2[0]:
            a=L1[2]-L2[2]
        elif L1[0]<L2[0]:
            a=L1[2]-L2[2]-1
    elif L1[1]<L2[1]:
        a=L1[2]-L2[2]-1
    if a==abs(a) and a<131:
        print("Case #"+str(r_i+1)+":",a)
    elif a>130:
        print("Case #"+str(r_i+1)+":","Check birth date")
    elif a<0:
        print("Case #"+str(r_i+1)+":","Invalid birth date")

# I was 56 years old before I die

 
ZeroJudge Forum