Added: 9 months ago
From: beergoogle
Views: 193
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (2)

Sign In or Sign Up now to post a comment!
  • In Python, without pretty printing, that's

    def pythag(n): return [(a, b, c) for a in range(1, n) for b in range(1, n) for c in range(1, n) if a + b + c <= n and c*c == a*a + b*b]

    print pythag(50)

  • Try Erlang #2 - Pythagorean Triplets

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more