Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • \$\begingroup\$ You do need to include imports, but from math import * will save a couple bytes \$\endgroup\$ Commented Aug 17, 2016 at 18:20
  • \$\begingroup\$ Included the import into the byte count \$\endgroup\$ Commented Aug 17, 2016 at 18:26
  • \$\begingroup\$ According to the spec, 0 is the minimum stars, not 1. Also save a whole 1 byte by import* with no space. \$\endgroup\$ Commented Aug 17, 2016 at 18:32
  • \$\begingroup\$ Oops I misread the minimum. Thanks for the tip \$\endgroup\$ Commented Aug 17, 2016 at 18:33
  • 1
    \$\begingroup\$ @Programman Though the spec says 0 is minimum, division and multiplication of non-negative, non-zero integers is guaranteed to != 0, and the ceiling operator will make anything between 0-1 and make it 1. Although I suppose there could be the case of 0 views, however 0 views implies 0 answers, which leads to undefined behavior (division by 0). It's likely provable that 0 is impossible and should not even be mentioned. \$\endgroup\$ Commented Aug 17, 2016 at 19:02