CSES - Datatähti 2023 alku - Results
Submission details
Task:Kortit
Sender:Redapo
Submission time:2022-10-31 13:46:38 +0200
Language:Python3 (CPython3)
Status:READY
Result:0
Feedback
groupverdictscore
#10
Test results
testverdicttime
#10.02 sdetails
#20.02 sdetails
#30.02 sdetails
#40.02 sdetails
#50.02 sdetails
#60.02 sdetails

Code

try:
    cardsd = int(input("Draw cards: "))
    print("Syöte:")
    print(cardsd)
    if cardsd < 0 or cardsd > 52:
        raise ValueError
except ValueError:
    print()
    print("Tuloste:")
    print("You can only draw between 0-52 cards")
            
if cardsd > 26 and cardsd <=52:
    print("Tuloste:")
    print("YES")
elif cardsd <= 26 and cardsd > 1:
    print("Tuloste:")
    print("MAYBE")
elif cardsd == 1 or cardsd == 0:
    print("Tuloste:")
    print("NO")

Test details

Test 1

Verdict:

input
0

correct output
NO

user output
Draw cards: Syöte:
0
Tuloste:
NO

Test 2

Verdict:

input
1

correct output
NO

user output
Draw cards: Syöte:
1
Tuloste:
NO

Test 3

Verdict:

input
2

correct output
MAYBE

user output
Draw cards: Syöte:
2
Tuloste:
MAYBE

Test 4

Verdict:

input
26

correct output
MAYBE

user output
Draw cards: Syöte:
26
Tuloste:
MAYBE

Test 5

Verdict:

input
27

correct output
YES

user output
Draw cards: Syöte:
27
Tuloste:
YES

Test 6

Verdict:

input
52

correct output
YES

user output
Draw cards: Syöte:
52
Tuloste:
YES