1 2 3 4 5 6 7 8 9 10 11 | def diamond(stars, spaces = 1): if stars == 0: print ' ' * spaces else: border = '*' * stars + ' ' * spaces + '*' * stars print border diamond(stars - 1, spaces + 2) print border diamond(5) |
ZGVmIGRpYW1vbmQoc3RhcnMsIHNwYWNlcyA9IDEpOgogICAgaWYgc3RhcnMgPT0gMDoKICAgICAgICBwcmludCAnICcgKiBzcGFjZXMKICAgIGVsc2U6CiAgICAgICAgYm9yZGVyID0gJyonICogc3RhcnMgKyAnICcgKiBzcGFjZXMgKyAnKicgKiBzdGFycwoKICAgICAgICBwcmludCBib3JkZXIKICAgICAgICBkaWFtb25kKHN0YXJzIC0gMSwgc3BhY2VzICsgMikKICAgICAgICBwcmludCBib3JkZXIKCmRpYW1vbmQoNSk=
-
upload with new input
-
result: Success time: 0.02s memory: 6356 kB returned value: 0
4 9
***** ***** **** **** *** *** ** ** * * * * ** ** *** *** **** **** ***** ***** -
result: Success time: 0.01s memory: 6356 kB returned value: 0
4
***** ***** **** **** *** *** ** ** * * * * ** ** *** *** **** **** ***** ***** -
result: Success time: 0.01s memory: 6356 kB returned value: 0
***** ***** **** **** *** *** ** ** * * * * ** ** *** *** **** **** ***** *****


