OILS / benchmarks / javascript / squares.py View on Github | oilshell.org

20 lines, 11 significant
1#!/usr/bin/env python2
2"""
3squares.py
4"""
5from __future__ import print_function
6
7import sys
8
9n = 1000
10x = 10000
11
12def main():
13 for i in xrange(n):
14 for j in xrange(i, n):
15 if i*i + j*j == x:
16 print(i, j)
17
18
19if __name__ == '__main__':
20 main()