Leeee1111 / testjudge-asia

0 stars 0 forks source link

B0210 星座查詢 #12

Open Leeee1111 opened 1 month ago

Leeee1111 commented 1 month ago
a=list(map(int,input().split()))
if a[0]==1:
    if a[1]<21:
        print("Capricorn")
    else:
        print("Aquarius")
elif a[0]==2:
    if a[1]<19:
        print("Aquarius")
    else:
        print("Pisces")
elif a[0]==3:
    if a[1]<21:
        print("Pisces")
    else:
        print("Aries")
elif a[0]==4:
    if a[1]<22:
        print("Aries")
    else:
        print("Taurus")
elif a[0]==5:
    if a[1]<22:
        print("Taurus")
    else:
        print("Gemini")
elif a[0]==6:
    if a[1]<23:
        print("Gemini")
    else:
        print("Cancer")
elif a[0]==7:
    if a[1]<24:
        print("Cancer")
    else:
        print("Leo")
elif a[0]==8:
    if a[1]<24:
        print("Leo")
    else:
        print("Virgo")
elif a[0]==9:
    if a[1]<24:
        print("Virgo")
    else:
        print("Libra")
elif a[0]==10:
    if a[1]<24:
        print("Libra")
    else:
        print("Scorpio")
elif a[0]==11:
    if a[1]<23:
        print("Scorpio")
    else:
        print("Sagittarius")
elif a[0]==12:
    if a[1]<22:
        print("Sagittarius")
    else:
        print("Capricorn")
Leeee1111 commented 1 month ago
month, day = map(int, input().split())
zodiac_ends = [21, 19, 21, 21, 22, 22, 23, 24, 24, 24, 23, 22]
zodiac_signs = ['Aquarius', 'Pisces', 'Aries', 'Taurus', 'Gemini', 'Cancer','Leo', 'Virgo', 'Libra', 'Scorpio', 'Sagittarius', 'Capricorn']
print(zodiac_signs[month - 1 if day >= zodiac_ends[month - 1] else month - 2])
Leeee1111 commented 1 month ago
a=list(map(int,input().split()))
b=[21,19,21,21,22,22,23,24,24,24,23,22]
c=['Aquarius','Pisces','Aries','Taurus','Gemini','Cancer','Leo','Virgo','Libra','Scorpio','Sagittarius','Capricorn']
if a[1]<b[a[0]-1]:
    print(c[a[0]-2])
else:
    print(c[a[0]-1])