• Sign Up
    Time to claim your honor
  • Training
  • Practice
    Complete challenging Kata to earn honor and ranks. Re-train to hone technique
  • Freestyle Sparring
    Take turns remixing and refactoring others code through Kumite
  • Community
  • Leaderboards
    Achieve honor and move up the global leaderboards
  • Chat
    Join our Discord server and chat with your fellow code warriors
  • Discussions
    View our Github Discussions board to discuss general Codewars topics
  • About
  • Docs
    Learn about all of the different aspects of Codewars
  • Blog
    Read the latest news from Codewars and the community
  • Log In
  • Sign Up
bugman4 Avatar
Name:bgws
Clan:Gensokyo
Member Since:Jan 2016
Last Seen:Jan 2018
Profiles:
Following:477
Followers:469
Allies:464
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations (73)
  • Replies
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • alexhrabovyi
    • commented on "Grasshopper - Summation" python solution
    • 2 months ago

    Tested this solution and the one with sum(range(1, num + 1)), so with argument of 1000, I had these results:
    range: 14.2409 sec
    formula: 0.1098 sec
    I know this is obvious, I shared it just for anybody who is curious

  • Custom User Avatar
    • Noktys
    • commented on "Grasshopper - Summation" python solution
    • 2 years ago

    Quick Maffs!

  • Custom User Avatar
    • UnciaPrograms
    • commented on "Grasshopper - Summation" python solution
    • 2 years ago

    Mate, this is the most intriguing and clever ways to solve this problem of summation. Hats off to you!

  • Custom User Avatar
    • HoneyBesuClair
    • commented on "Regex validate PIN code" python solution
    • 2 years ago

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar
    • Paper-Byte
    • commented on "Grasshopper - Summation" python solution
    • 2 years ago

    Pure math is alsways in theory faster. Learned this algo from a friend of mine, will always remember it for sum of range problems starting at 0 or 1

  • Custom User Avatar
    • Achillis
    • commented on "Grasshopper - Summation" python solution
    • 2 years ago

    very very clever

  • Custom User Avatar
    • UsmonovBaxromjon
    • commented on "Grasshopper - Summation" python solution
    • 2 years ago

    i like the unusual way

  • Custom User Avatar
    • yonozekenzoid
    • commented on "Grasshopper - Summation" python solution
    • 2 years ago

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar
    • Mitrey Maugli
    • commented on "Grasshopper - Summation" python solution
    • 3 years ago

    That's a good trick, i didn't know about that.

  • Custom User Avatar
    • Gabrango
    • commented on "Grasshopper - Summation" python solution
    • 3 years ago

    I'm not that good at math fam

  • Custom User Avatar
    • TK4h30
    • commented on "Grasshopper - Summation" python solution
    • 3 years ago

    perfection**

  • Custom User Avatar
    • Divine Daniel
    • commented on "Grasshopper - Summation" python solution
    • 3 years ago

    I feel so dumb lmao

  • Custom User Avatar
    • leztien
    • commented on "Regex validate PIN code" python solution
    • 3 years ago

    "¹234" returns True because str.isdigit treats superscripts as digits.
    Instead str.isdecimal should be used.

  • Custom User Avatar
    • KMohZaid
    • commented on "Grasshopper - Summation" python solution
    • 3 years ago

    best code with less execution time

  • Custom User Avatar
    • Ro0ster
    • commented on "Regex validate PIN code" python solution
    • 3 years ago

    This is great, thanks for this

  • Loading more items...
  • © 2025 Codewars
  • About
  • API
  • Blog
  • Privacy
  • Terms
  • Code of Conduct
  • Contact

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...