# ZHANG Yixin 15210130100

## Homework1

``````

In [2]:

import random, datetime
import numpy as np
import pylab as plt
import statsmodels.api as sm
from scipy.stats import norm
from scipy.stats.stats import pearsonr

``````
``````

In [3]:

str(3)

``````
``````

Out[3]:

'3'

``````
``````

In [4]:

int('5')

``````
``````

Out[4]:

5

``````
``````

In [5]:

float('7.1')

``````
``````

Out[5]:

7.1

``````
``````

In [6]:

range(10)

``````
``````

Out[6]:

[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

``````
``````

In [7]:

range(1,10)

``````
``````

Out[7]:

[1, 2, 3, 4, 5, 6, 7, 8, 9]

``````
``````

In [8]:

dir

``````
``````

Out[8]:

<function dir>

``````
``````

In [9]:

dir(str)[-5:]

``````
``````

Out[9]:

['swapcase', 'title', 'translate', 'upper', 'zfill']

``````
``````

In [10]:

x='Hello WorlD'
dir(x)[-10:]

``````
``````

Out[10]:

['rstrip',
'split',
'splitlines',
'startswith',
'strip',
'swapcase',
'title',
'translate',
'upper',
'zfill']

``````
``````

In [11]:

x.lower()

``````
``````

Out[11]:

'hello world'

``````
``````

In [12]:

x.upper()

``````
``````

Out[12]:

'HELLO WORLD'

``````
``````

In [13]:

x.rstrip()

``````
``````

Out[13]:

'Hello WorlD'

``````
``````

In [14]:

x.strip()

``````
``````

Out[14]:

'Hello WorlD'

``````
``````

In [16]:

x='hello world'
type(x)

``````
``````

Out[16]:

str

``````
``````

In [18]:

l=[1,2,3,3]
t=(1,2,3,3)
s=set([1,2,3,3])
d={'a':1,'b':2,'c':3}
a=np.array(l)
print l,t,s,d,a

``````
``````

[1, 2, 3, 3] (1, 2, 3, 3) set([1, 2, 3]) {'a': 1, 'c': 3, 'b': 2} [1 2 3 3]

``````
``````

In [19]:

l=[1,2,3,3]
l.append(4)
l

``````
``````

Out[19]:

[1, 2, 3, 3, 4]

``````
``````

In [20]:

d={'a':1,'b':2,'c':3}
d.keys()

``````
``````

Out[20]:

['a', 'c', 'b']

``````
``````

In [21]:

d={'a':1,'b':2,'c':3}
d.values()

``````
``````

Out[21]:

[1, 3, 2]

``````
``````

In [22]:

d={'a':1,'b':2,'c':3}
d.items()

``````
``````

Out[22]:

[('a', 1), ('c', 3), ('b', 2)]

``````
``````

In [23]:

def devidePlus(m,n):
return float(m)/n+1

``````
``````

In [24]:

range(10)

``````
``````

Out[24]:

[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

``````
``````

In [25]:

range(1,10)

``````
``````

Out[25]:

[1, 2, 3, 4, 5, 6, 7, 8, 9]

``````
``````

In [26]:

for i in range(10):
print i,i*10, i**2

``````
``````

0 0 0
1 10 1
2 20 4
3 30 9
4 40 16
5 50 25
6 60 36
7 70 49
8 80 64
9 90 81

``````
``````

In [27]:

for i in range(10):
print i*10

``````
``````

0
10
20
30
40
50
60
70
80
90

``````
``````

In [28]:

r = [devidePlus(i,2) for i in range(10)]
r

``````
``````

Out[28]:

[1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5]

``````
``````

In [29]:

map(devidePlus, [4,2],[2,1])

``````
``````

Out[29]:

[3.0, 3.0]

``````
``````

In [32]:

j=3
if j%2==1:
print r'余数是1'
elif j%2==2:
print r'余数是2'
else:
print r' 余数既不是1也不是2'

``````
``````

``````
``````

In [33]:

x=5
if x<5:
y=-1
z=5
elif x>5:
y=1
z=11
else:
y=0
z=10
print(x,y,z)

``````
``````

(5, 0, 10)

``````
``````

In [34]:

j=0
while j<10:
print j
j+=1

``````
``````

0
1
2
3
4
5
6
7
8
9

``````
``````

In [35]:

j=0
while j<10:
if j%2 !=0:
print j**2
j+=1

``````
``````

1
9
25
49
81

``````
``````

In [37]:

j=0
while j<50:
if j==30:
break
if j%2 !=0:
print j**2
j+=1

``````
``````

1
9
25
49
81
121
169
225
289
361
441
529
625
729
841

``````
``````

In [38]:

for i in [2,0,5]:
try:
print devidePlus(4,i)
except Exception, e:
print e
pass

``````
``````

3.0
float division by zero
1.8

``````
``````

In [39]:

data =[[i,i**2,i**3] for i in range(10)]
data

``````
``````

Out[39]:

[[0, 0, 0],
[1, 1, 1],
[2, 4, 8],
[3, 9, 27],
[4, 16, 64],
[5, 25, 125],
[6, 36, 216],
[7, 49, 343],
[8, 64, 512],
[9, 81, 729]]

``````
``````

In [40]:

for i in data:
print '\t'.join(map(str,i))

``````
``````

0	0	0
1	1	1
2	4	8
3	9	27
4	16	64
5	25	125
6	36	216
7	49	343
8	64	512
9	81	729

``````
``````

In [44]:

type(data)

``````
``````

Out[44]:

list

``````
``````

In [45]:

len(data)

``````
``````

Out[45]:

10

``````
``````

In [47]:

data[0]

``````
``````

Out[47]:

[0, 0, 0]

``````
``````

In [50]:

data=[[i,i**2,i**3] for i in range(10000)]
f= open("/Users/zhangyixin/Documents/data_write_to_file.txt","wb")
for i in data:
f.write('\t'.join(map(str,i))+"\n")
f.close()

``````
``````

In [51]:

with open('/Users/zhangyixin/Documents/data_write_to_file.txt','r') as f:
data[:5]

``````
``````

Out[51]:

['0\t0\t0\n', '1\t1\t1\n', '2\t4\t8\n', '3\t9\t27\n', '4\t16\t64\n']

``````
``````

In [53]:

with open('/Users/zhangyixin/Documents/data_write_to_file.txt','r') as f:
len(data)

``````
``````

Out[53]:

459

``````
``````

In [54]:

with open('/Users/zhangyixin/Documents/data_write_to_file.txt','r') as f:

``````
``````

0	0	0

``````
``````

In [55]:

with open('/Users/zhangyixin/Documents/data_write_to_file.txt','r') as f:
for k,i in enumerate(f):
if k%2000==0:
print i

``````
``````

0	0	0

2000	4000000	8000000000

4000	16000000	64000000000

6000	36000000	216000000000

8000	64000000	512000000000

``````
``````

In [58]:

data=[]
with open("/Users/zhangyixin/Documents/data_write_to_file.txt",'r') as f:
for line in f:
line=line.replace('\n','').split('\t')
line=[int(i) for i in line]
data.append(line)
data

``````
``````

Out[58]:

[[0, 0, 0],
[1, 1, 1],
[2, 4, 8],
[3, 9, 27],
[4, 16, 64],
[5, 25, 125],
[6, 36, 216],
[7, 49, 343],
[8, 64, 512],
[9, 81, 729],
[10, 100, 1000],
[11, 121, 1331],
[12, 144, 1728],
[13, 169, 2197],
[14, 196, 2744],
[15, 225, 3375],
[16, 256, 4096],
[17, 289, 4913],
[18, 324, 5832],
[19, 361, 6859],
[20, 400, 8000],
[21, 441, 9261],
[22, 484, 10648],
[23, 529, 12167],
[24, 576, 13824],
[25, 625, 15625],
[26, 676, 17576],
[27, 729, 19683],
[28, 784, 21952],
[29, 841, 24389],
[30, 900, 27000],
[31, 961, 29791],
[32, 1024, 32768],
[33, 1089, 35937],
[34, 1156, 39304],
[35, 1225, 42875],
[36, 1296, 46656],
[37, 1369, 50653],
[38, 1444, 54872],
[39, 1521, 59319],
[40, 1600, 64000],
[41, 1681, 68921],
[42, 1764, 74088],
[43, 1849, 79507],
[44, 1936, 85184],
[45, 2025, 91125],
[46, 2116, 97336],
[47, 2209, 103823],
[48, 2304, 110592],
[49, 2401, 117649],
[50, 2500, 125000],
[51, 2601, 132651],
[52, 2704, 140608],
[53, 2809, 148877],
[54, 2916, 157464],
[55, 3025, 166375],
[56, 3136, 175616],
[57, 3249, 185193],
[58, 3364, 195112],
[59, 3481, 205379],
[60, 3600, 216000],
[61, 3721, 226981],
[62, 3844, 238328],
[63, 3969, 250047],
[64, 4096, 262144],
[65, 4225, 274625],
[66, 4356, 287496],
[67, 4489, 300763],
[68, 4624, 314432],
[69, 4761, 328509],
[70, 4900, 343000],
[71, 5041, 357911],
[72, 5184, 373248],
[73, 5329, 389017],
[74, 5476, 405224],
[75, 5625, 421875],
[76, 5776, 438976],
[77, 5929, 456533],
[78, 6084, 474552],
[79, 6241, 493039],
[80, 6400, 512000],
[81, 6561, 531441],
[82, 6724, 551368],
[83, 6889, 571787],
[84, 7056, 592704],
[85, 7225, 614125],
[86, 7396, 636056],
[87, 7569, 658503],
[88, 7744, 681472],
[89, 7921, 704969],
[90, 8100, 729000],
[91, 8281, 753571],
[92, 8464, 778688],
[93, 8649, 804357],
[94, 8836, 830584],
[95, 9025, 857375],
[96, 9216, 884736],
[97, 9409, 912673],
[98, 9604, 941192],
[99, 9801, 970299],
[100, 10000, 1000000],
[101, 10201, 1030301],
[102, 10404, 1061208],
[103, 10609, 1092727],
[104, 10816, 1124864],
[105, 11025, 1157625],
[106, 11236, 1191016],
[107, 11449, 1225043],
[108, 11664, 1259712],
[109, 11881, 1295029],
[110, 12100, 1331000],
[111, 12321, 1367631],
[112, 12544, 1404928],
[113, 12769, 1442897],
[114, 12996, 1481544],
[115, 13225, 1520875],
[116, 13456, 1560896],
[117, 13689, 1601613],
[118, 13924, 1643032],
[119, 14161, 1685159],
[120, 14400, 1728000],
[121, 14641, 1771561],
[122, 14884, 1815848],
[123, 15129, 1860867],
[124, 15376, 1906624],
[125, 15625, 1953125],
[126, 15876, 2000376],
[127, 16129, 2048383],
[128, 16384, 2097152],
[129, 16641, 2146689],
[130, 16900, 2197000],
[131, 17161, 2248091],
[132, 17424, 2299968],
[133, 17689, 2352637],
[134, 17956, 2406104],
[135, 18225, 2460375],
[136, 18496, 2515456],
[137, 18769, 2571353],
[138, 19044, 2628072],
[139, 19321, 2685619],
[140, 19600, 2744000],
[141, 19881, 2803221],
[142, 20164, 2863288],
[143, 20449, 2924207],
[144, 20736, 2985984],
[145, 21025, 3048625],
[146, 21316, 3112136],
[147, 21609, 3176523],
[148, 21904, 3241792],
[149, 22201, 3307949],
[150, 22500, 3375000],
[151, 22801, 3442951],
[152, 23104, 3511808],
[153, 23409, 3581577],
[154, 23716, 3652264],
[155, 24025, 3723875],
[156, 24336, 3796416],
[157, 24649, 3869893],
[158, 24964, 3944312],
[159, 25281, 4019679],
[160, 25600, 4096000],
[161, 25921, 4173281],
[162, 26244, 4251528],
[163, 26569, 4330747],
[164, 26896, 4410944],
[165, 27225, 4492125],
[166, 27556, 4574296],
[167, 27889, 4657463],
[168, 28224, 4741632],
[169, 28561, 4826809],
[170, 28900, 4913000],
[171, 29241, 5000211],
[172, 29584, 5088448],
[173, 29929, 5177717],
[174, 30276, 5268024],
[175, 30625, 5359375],
[176, 30976, 5451776],
[177, 31329, 5545233],
[178, 31684, 5639752],
[179, 32041, 5735339],
[180, 32400, 5832000],
[181, 32761, 5929741],
[182, 33124, 6028568],
[183, 33489, 6128487],
[184, 33856, 6229504],
[185, 34225, 6331625],
[186, 34596, 6434856],
[187, 34969, 6539203],
[188, 35344, 6644672],
[189, 35721, 6751269],
[190, 36100, 6859000],
[191, 36481, 6967871],
[192, 36864, 7077888],
[193, 37249, 7189057],
[194, 37636, 7301384],
[195, 38025, 7414875],
[196, 38416, 7529536],
[197, 38809, 7645373],
[198, 39204, 7762392],
[199, 39601, 7880599],
[200, 40000, 8000000],
[201, 40401, 8120601],
[202, 40804, 8242408],
[203, 41209, 8365427],
[204, 41616, 8489664],
[205, 42025, 8615125],
[206, 42436, 8741816],
[207, 42849, 8869743],
[208, 43264, 8998912],
[209, 43681, 9129329],
[210, 44100, 9261000],
[211, 44521, 9393931],
[212, 44944, 9528128],
[213, 45369, 9663597],
[214, 45796, 9800344],
[215, 46225, 9938375],
[216, 46656, 10077696],
[217, 47089, 10218313],
[218, 47524, 10360232],
[219, 47961, 10503459],
[220, 48400, 10648000],
[221, 48841, 10793861],
[222, 49284, 10941048],
[223, 49729, 11089567],
[224, 50176, 11239424],
[225, 50625, 11390625],
[226, 51076, 11543176],
[227, 51529, 11697083],
[228, 51984, 11852352],
[229, 52441, 12008989],
[230, 52900, 12167000],
[231, 53361, 12326391],
[232, 53824, 12487168],
[233, 54289, 12649337],
[234, 54756, 12812904],
[235, 55225, 12977875],
[236, 55696, 13144256],
[237, 56169, 13312053],
[238, 56644, 13481272],
[239, 57121, 13651919],
[240, 57600, 13824000],
[241, 58081, 13997521],
[242, 58564, 14172488],
[243, 59049, 14348907],
[244, 59536, 14526784],
[245, 60025, 14706125],
[246, 60516, 14886936],
[247, 61009, 15069223],
[248, 61504, 15252992],
[249, 62001, 15438249],
[250, 62500, 15625000],
[251, 63001, 15813251],
[252, 63504, 16003008],
[253, 64009, 16194277],
[254, 64516, 16387064],
[255, 65025, 16581375],
[256, 65536, 16777216],
[257, 66049, 16974593],
[258, 66564, 17173512],
[259, 67081, 17373979],
[260, 67600, 17576000],
[261, 68121, 17779581],
[262, 68644, 17984728],
[263, 69169, 18191447],
[264, 69696, 18399744],
[265, 70225, 18609625],
[266, 70756, 18821096],
[267, 71289, 19034163],
[268, 71824, 19248832],
[269, 72361, 19465109],
[270, 72900, 19683000],
[271, 73441, 19902511],
[272, 73984, 20123648],
[273, 74529, 20346417],
[274, 75076, 20570824],
[275, 75625, 20796875],
[276, 76176, 21024576],
[277, 76729, 21253933],
[278, 77284, 21484952],
[279, 77841, 21717639],
[280, 78400, 21952000],
[281, 78961, 22188041],
[282, 79524, 22425768],
[283, 80089, 22665187],
[284, 80656, 22906304],
[285, 81225, 23149125],
[286, 81796, 23393656],
[287, 82369, 23639903],
[288, 82944, 23887872],
[289, 83521, 24137569],
[290, 84100, 24389000],
[291, 84681, 24642171],
[292, 85264, 24897088],
[293, 85849, 25153757],
[294, 86436, 25412184],
[295, 87025, 25672375],
[296, 87616, 25934336],
[297, 88209, 26198073],
[298, 88804, 26463592],
[299, 89401, 26730899],
[300, 90000, 27000000],
[301, 90601, 27270901],
[302, 91204, 27543608],
[303, 91809, 27818127],
[304, 92416, 28094464],
[305, 93025, 28372625],
[306, 93636, 28652616],
[307, 94249, 28934443],
[308, 94864, 29218112],
[309, 95481, 29503629],
[310, 96100, 29791000],
[311, 96721, 30080231],
[312, 97344, 30371328],
[313, 97969, 30664297],
[314, 98596, 30959144],
[315, 99225, 31255875],
[316, 99856, 31554496],
[317, 100489, 31855013],
[318, 101124, 32157432],
[319, 101761, 32461759],
[320, 102400, 32768000],
[321, 103041, 33076161],
[322, 103684, 33386248],
[323, 104329, 33698267],
[324, 104976, 34012224],
[325, 105625, 34328125],
[326, 106276, 34645976],
[327, 106929, 34965783],
[328, 107584, 35287552],
[329, 108241, 35611289],
[330, 108900, 35937000],
[331, 109561, 36264691],
[332, 110224, 36594368],
[333, 110889, 36926037],
[334, 111556, 37259704],
[335, 112225, 37595375],
[336, 112896, 37933056],
[337, 113569, 38272753],
[338, 114244, 38614472],
[339, 114921, 38958219],
[340, 115600, 39304000],
[341, 116281, 39651821],
[342, 116964, 40001688],
[343, 117649, 40353607],
[344, 118336, 40707584],
[345, 119025, 41063625],
[346, 119716, 41421736],
[347, 120409, 41781923],
[348, 121104, 42144192],
[349, 121801, 42508549],
[350, 122500, 42875000],
[351, 123201, 43243551],
[352, 123904, 43614208],
[353, 124609, 43986977],
[354, 125316, 44361864],
[355, 126025, 44738875],
[356, 126736, 45118016],
[357, 127449, 45499293],
[358, 128164, 45882712],
[359, 128881, 46268279],
[360, 129600, 46656000],
[361, 130321, 47045881],
[362, 131044, 47437928],
[363, 131769, 47832147],
[364, 132496, 48228544],
[365, 133225, 48627125],
[366, 133956, 49027896],
[367, 134689, 49430863],
[368, 135424, 49836032],
[369, 136161, 50243409],
[370, 136900, 50653000],
[371, 137641, 51064811],
[372, 138384, 51478848],
[373, 139129, 51895117],
[374, 139876, 52313624],
[375, 140625, 52734375],
[376, 141376, 53157376],
[377, 142129, 53582633],
[378, 142884, 54010152],
[379, 143641, 54439939],
[380, 144400, 54872000],
[381, 145161, 55306341],
[382, 145924, 55742968],
[383, 146689, 56181887],
[384, 147456, 56623104],
[385, 148225, 57066625],
[386, 148996, 57512456],
[387, 149769, 57960603],
[388, 150544, 58411072],
[389, 151321, 58863869],
[390, 152100, 59319000],
[391, 152881, 59776471],
[392, 153664, 60236288],
[393, 154449, 60698457],
[394, 155236, 61162984],
[395, 156025, 61629875],
[396, 156816, 62099136],
[397, 157609, 62570773],
[398, 158404, 63044792],
[399, 159201, 63521199],
[400, 160000, 64000000],
[401, 160801, 64481201],
[402, 161604, 64964808],
[403, 162409, 65450827],
[404, 163216, 65939264],
[405, 164025, 66430125],
[406, 164836, 66923416],
[407, 165649, 67419143],
[408, 166464, 67917312],
[409, 167281, 68417929],
[410, 168100, 68921000],
[411, 168921, 69426531],
[412, 169744, 69934528],
[413, 170569, 70444997],
[414, 171396, 70957944],
[415, 172225, 71473375],
[416, 173056, 71991296],
[417, 173889, 72511713],
[418, 174724, 73034632],
[419, 175561, 73560059],
[420, 176400, 74088000],
[421, 177241, 74618461],
[422, 178084, 75151448],
[423, 178929, 75686967],
[424, 179776, 76225024],
[425, 180625, 76765625],
[426, 181476, 77308776],
[427, 182329, 77854483],
[428, 183184, 78402752],
[429, 184041, 78953589],
[430, 184900, 79507000],
[431, 185761, 80062991],
[432, 186624, 80621568],
[433, 187489, 81182737],
[434, 188356, 81746504],
[435, 189225, 82312875],
[436, 190096, 82881856],
[437, 190969, 83453453],
[438, 191844, 84027672],
[439, 192721, 84604519],
[440, 193600, 85184000],
[441, 194481, 85766121],
[442, 195364, 86350888],
[443, 196249, 86938307],
[444, 197136, 87528384],
[445, 198025, 88121125],
[446, 198916, 88716536],
[447, 199809, 89314623],
[448, 200704, 89915392],
[449, 201601, 90518849],
[450, 202500, 91125000],
[451, 203401, 91733851],
[452, 204304, 92345408],
[453, 205209, 92959677],
[454, 206116, 93576664],
[455, 207025, 94196375],
[456, 207936, 94818816],
[457, 208849, 95443993],
[458, 209764, 96071912],
[459, 210681, 96702579],
[460, 211600, 97336000],
[461, 212521, 97972181],
[462, 213444, 98611128],
[463, 214369, 99252847],
[464, 215296, 99897344],
[465, 216225, 100544625],
[466, 217156, 101194696],
[467, 218089, 101847563],
[468, 219024, 102503232],
[469, 219961, 103161709],
[470, 220900, 103823000],
[471, 221841, 104487111],
[472, 222784, 105154048],
[473, 223729, 105823817],
[474, 224676, 106496424],
[475, 225625, 107171875],
[476, 226576, 107850176],
[477, 227529, 108531333],
[478, 228484, 109215352],
[479, 229441, 109902239],
[480, 230400, 110592000],
[481, 231361, 111284641],
[482, 232324, 111980168],
[483, 233289, 112678587],
[484, 234256, 113379904],
[485, 235225, 114084125],
[486, 236196, 114791256],
[487, 237169, 115501303],
[488, 238144, 116214272],
[489, 239121, 116930169],
[490, 240100, 117649000],
[491, 241081, 118370771],
[492, 242064, 119095488],
[493, 243049, 119823157],
[494, 244036, 120553784],
[495, 245025, 121287375],
[496, 246016, 122023936],
[497, 247009, 122763473],
[498, 248004, 123505992],
[499, 249001, 124251499],
[500, 250000, 125000000],
[501, 251001, 125751501],
[502, 252004, 126506008],
[503, 253009, 127263527],
[504, 254016, 128024064],
[505, 255025, 128787625],
[506, 256036, 129554216],
[507, 257049, 130323843],
[508, 258064, 131096512],
[509, 259081, 131872229],
[510, 260100, 132651000],
[511, 261121, 133432831],
[512, 262144, 134217728],
[513, 263169, 135005697],
[514, 264196, 135796744],
[515, 265225, 136590875],
[516, 266256, 137388096],
[517, 267289, 138188413],
[518, 268324, 138991832],
[519, 269361, 139798359],
[520, 270400, 140608000],
[521, 271441, 141420761],
[522, 272484, 142236648],
[523, 273529, 143055667],
[524, 274576, 143877824],
[525, 275625, 144703125],
[526, 276676, 145531576],
[527, 277729, 146363183],
[528, 278784, 147197952],
[529, 279841, 148035889],
[530, 280900, 148877000],
[531, 281961, 149721291],
[532, 283024, 150568768],
[533, 284089, 151419437],
[534, 285156, 152273304],
[535, 286225, 153130375],
[536, 287296, 153990656],
[537, 288369, 154854153],
[538, 289444, 155720872],
[539, 290521, 156590819],
[540, 291600, 157464000],
[541, 292681, 158340421],
[542, 293764, 159220088],
[543, 294849, 160103007],
[544, 295936, 160989184],
[545, 297025, 161878625],
[546, 298116, 162771336],
[547, 299209, 163667323],
[548, 300304, 164566592],
[549, 301401, 165469149],
[550, 302500, 166375000],
[551, 303601, 167284151],
[552, 304704, 168196608],
[553, 305809, 169112377],
[554, 306916, 170031464],
[555, 308025, 170953875],
[556, 309136, 171879616],
[557, 310249, 172808693],
[558, 311364, 173741112],
[559, 312481, 174676879],
[560, 313600, 175616000],
[561, 314721, 176558481],
[562, 315844, 177504328],
[563, 316969, 178453547],
[564, 318096, 179406144],
[565, 319225, 180362125],
[566, 320356, 181321496],
[567, 321489, 182284263],
[568, 322624, 183250432],
[569, 323761, 184220009],
[570, 324900, 185193000],
[571, 326041, 186169411],
[572, 327184, 187149248],
[573, 328329, 188132517],
[574, 329476, 189119224],
[575, 330625, 190109375],
[576, 331776, 191102976],
[577, 332929, 192100033],
[578, 334084, 193100552],
[579, 335241, 194104539],
[580, 336400, 195112000],
[581, 337561, 196122941],
[582, 338724, 197137368],
[583, 339889, 198155287],
[584, 341056, 199176704],
[585, 342225, 200201625],
[586, 343396, 201230056],
[587, 344569, 202262003],
[588, 345744, 203297472],
[589, 346921, 204336469],
[590, 348100, 205379000],
[591, 349281, 206425071],
[592, 350464, 207474688],
[593, 351649, 208527857],
[594, 352836, 209584584],
[595, 354025, 210644875],
[596, 355216, 211708736],
[597, 356409, 212776173],
[598, 357604, 213847192],
[599, 358801, 214921799],
[600, 360000, 216000000],
[601, 361201, 217081801],
[602, 362404, 218167208],
[603, 363609, 219256227],
[604, 364816, 220348864],
[605, 366025, 221445125],
[606, 367236, 222545016],
[607, 368449, 223648543],
[608, 369664, 224755712],
[609, 370881, 225866529],
[610, 372100, 226981000],
[611, 373321, 228099131],
[612, 374544, 229220928],
[613, 375769, 230346397],
[614, 376996, 231475544],
[615, 378225, 232608375],
[616, 379456, 233744896],
[617, 380689, 234885113],
[618, 381924, 236029032],
[619, 383161, 237176659],
[620, 384400, 238328000],
[621, 385641, 239483061],
[622, 386884, 240641848],
[623, 388129, 241804367],
[624, 389376, 242970624],
[625, 390625, 244140625],
[626, 391876, 245314376],
[627, 393129, 246491883],
[628, 394384, 247673152],
[629, 395641, 248858189],
[630, 396900, 250047000],
[631, 398161, 251239591],
[632, 399424, 252435968],
[633, 400689, 253636137],
[634, 401956, 254840104],
[635, 403225, 256047875],
[636, 404496, 257259456],
[637, 405769, 258474853],
[638, 407044, 259694072],
[639, 408321, 260917119],
[640, 409600, 262144000],
[641, 410881, 263374721],
[642, 412164, 264609288],
[643, 413449, 265847707],
[644, 414736, 267089984],
[645, 416025, 268336125],
[646, 417316, 269586136],
[647, 418609, 270840023],
[648, 419904, 272097792],
[649, 421201, 273359449],
[650, 422500, 274625000],
[651, 423801, 275894451],
[652, 425104, 277167808],
[653, 426409, 278445077],
[654, 427716, 279726264],
[655, 429025, 281011375],
[656, 430336, 282300416],
[657, 431649, 283593393],
[658, 432964, 284890312],
[659, 434281, 286191179],
[660, 435600, 287496000],
[661, 436921, 288804781],
[662, 438244, 290117528],
[663, 439569, 291434247],
[664, 440896, 292754944],
[665, 442225, 294079625],
[666, 443556, 295408296],
[667, 444889, 296740963],
[668, 446224, 298077632],
[669, 447561, 299418309],
[670, 448900, 300763000],
[671, 450241, 302111711],
[672, 451584, 303464448],
[673, 452929, 304821217],
[674, 454276, 306182024],
[675, 455625, 307546875],
[676, 456976, 308915776],
[677, 458329, 310288733],
[678, 459684, 311665752],
[679, 461041, 313046839],
[680, 462400, 314432000],
[681, 463761, 315821241],
[682, 465124, 317214568],
[683, 466489, 318611987],
[684, 467856, 320013504],
[685, 469225, 321419125],
[686, 470596, 322828856],
[687, 471969, 324242703],
[688, 473344, 325660672],
[689, 474721, 327082769],
[690, 476100, 328509000],
[691, 477481, 329939371],
[692, 478864, 331373888],
[693, 480249, 332812557],
[694, 481636, 334255384],
[695, 483025, 335702375],
[696, 484416, 337153536],
[697, 485809, 338608873],
[698, 487204, 340068392],
[699, 488601, 341532099],
[700, 490000, 343000000],
[701, 491401, 344472101],
[702, 492804, 345948408],
[703, 494209, 347428927],
[704, 495616, 348913664],
[705, 497025, 350402625],
[706, 498436, 351895816],
[707, 499849, 353393243],
[708, 501264, 354894912],
[709, 502681, 356400829],
[710, 504100, 357911000],
[711, 505521, 359425431],
[712, 506944, 360944128],
[713, 508369, 362467097],
[714, 509796, 363994344],
[715, 511225, 365525875],
[716, 512656, 367061696],
[717, 514089, 368601813],
[718, 515524, 370146232],
[719, 516961, 371694959],
[720, 518400, 373248000],
[721, 519841, 374805361],
[722, 521284, 376367048],
[723, 522729, 377933067],
[724, 524176, 379503424],
[725, 525625, 381078125],
[726, 527076, 382657176],
[727, 528529, 384240583],
[728, 529984, 385828352],
[729, 531441, 387420489],
[730, 532900, 389017000],
[731, 534361, 390617891],
[732, 535824, 392223168],
[733, 537289, 393832837],
[734, 538756, 395446904],
[735, 540225, 397065375],
[736, 541696, 398688256],
[737, 543169, 400315553],
[738, 544644, 401947272],
[739, 546121, 403583419],
[740, 547600, 405224000],
[741, 549081, 406869021],
[742, 550564, 408518488],
[743, 552049, 410172407],
[744, 553536, 411830784],
[745, 555025, 413493625],
[746, 556516, 415160936],
[747, 558009, 416832723],
[748, 559504, 418508992],
[749, 561001, 420189749],
[750, 562500, 421875000],
[751, 564001, 423564751],
[752, 565504, 425259008],
[753, 567009, 426957777],
[754, 568516, 428661064],
[755, 570025, 430368875],
[756, 571536, 432081216],
[757, 573049, 433798093],
[758, 574564, 435519512],
[759, 576081, 437245479],
[760, 577600, 438976000],
[761, 579121, 440711081],
[762, 580644, 442450728],
[763, 582169, 444194947],
[764, 583696, 445943744],
[765, 585225, 447697125],
[766, 586756, 449455096],
[767, 588289, 451217663],
[768, 589824, 452984832],
[769, 591361, 454756609],
[770, 592900, 456533000],
[771, 594441, 458314011],
[772, 595984, 460099648],
[773, 597529, 461889917],
[774, 599076, 463684824],
[775, 600625, 465484375],
[776, 602176, 467288576],
[777, 603729, 469097433],
[778, 605284, 470910952],
[779, 606841, 472729139],
[780, 608400, 474552000],
[781, 609961, 476379541],
[782, 611524, 478211768],
[783, 613089, 480048687],
[784, 614656, 481890304],
[785, 616225, 483736625],
[786, 617796, 485587656],
[787, 619369, 487443403],
[788, 620944, 489303872],
[789, 622521, 491169069],
[790, 624100, 493039000],
[791, 625681, 494913671],
[792, 627264, 496793088],
[793, 628849, 498677257],
[794, 630436, 500566184],
[795, 632025, 502459875],
[796, 633616, 504358336],
[797, 635209, 506261573],
[798, 636804, 508169592],
[799, 638401, 510082399],
[800, 640000, 512000000],
[801, 641601, 513922401],
[802, 643204, 515849608],
[803, 644809, 517781627],
[804, 646416, 519718464],
[805, 648025, 521660125],
[806, 649636, 523606616],
[807, 651249, 525557943],
[808, 652864, 527514112],
[809, 654481, 529475129],
[810, 656100, 531441000],
[811, 657721, 533411731],
[812, 659344, 535387328],
[813, 660969, 537367797],
[814, 662596, 539353144],
[815, 664225, 541343375],
[816, 665856, 543338496],
[817, 667489, 545338513],
[818, 669124, 547343432],
[819, 670761, 549353259],
[820, 672400, 551368000],
[821, 674041, 553387661],
[822, 675684, 555412248],
[823, 677329, 557441767],
[824, 678976, 559476224],
[825, 680625, 561515625],
[826, 682276, 563559976],
[827, 683929, 565609283],
[828, 685584, 567663552],
[829, 687241, 569722789],
[830, 688900, 571787000],
[831, 690561, 573856191],
[832, 692224, 575930368],
[833, 693889, 578009537],
[834, 695556, 580093704],
[835, 697225, 582182875],
[836, 698896, 584277056],
[837, 700569, 586376253],
[838, 702244, 588480472],
[839, 703921, 590589719],
[840, 705600, 592704000],
[841, 707281, 594823321],
[842, 708964, 596947688],
[843, 710649, 599077107],
[844, 712336, 601211584],
[845, 714025, 603351125],
[846, 715716, 605495736],
[847, 717409, 607645423],
[848, 719104, 609800192],
[849, 720801, 611960049],
[850, 722500, 614125000],
[851, 724201, 616295051],
[852, 725904, 618470208],
[853, 727609, 620650477],
[854, 729316, 622835864],
[855, 731025, 625026375],
[856, 732736, 627222016],
[857, 734449, 629422793],
[858, 736164, 631628712],
[859, 737881, 633839779],
[860, 739600, 636056000],
[861, 741321, 638277381],
[862, 743044, 640503928],
[863, 744769, 642735647],
[864, 746496, 644972544],
[865, 748225, 647214625],
[866, 749956, 649461896],
[867, 751689, 651714363],
[868, 753424, 653972032],
[869, 755161, 656234909],
[870, 756900, 658503000],
[871, 758641, 660776311],
[872, 760384, 663054848],
[873, 762129, 665338617],
[874, 763876, 667627624],
[875, 765625, 669921875],
[876, 767376, 672221376],
[877, 769129, 674526133],
[878, 770884, 676836152],
[879, 772641, 679151439],
[880, 774400, 681472000],
[881, 776161, 683797841],
[882, 777924, 686128968],
[883, 779689, 688465387],
[884, 781456, 690807104],
[885, 783225, 693154125],
[886, 784996, 695506456],
[887, 786769, 697864103],
[888, 788544, 700227072],
[889, 790321, 702595369],
[890, 792100, 704969000],
[891, 793881, 707347971],
[892, 795664, 709732288],
[893, 797449, 712121957],
[894, 799236, 714516984],
[895, 801025, 716917375],
[896, 802816, 719323136],
[897, 804609, 721734273],
[898, 806404, 724150792],
[899, 808201, 726572699],
[900, 810000, 729000000],
[901, 811801, 731432701],
[902, 813604, 733870808],
[903, 815409, 736314327],
[904, 817216, 738763264],
[905, 819025, 741217625],
[906, 820836, 743677416],
[907, 822649, 746142643],
[908, 824464, 748613312],
[909, 826281, 751089429],
[910, 828100, 753571000],
[911, 829921, 756058031],
[912, 831744, 758550528],
[913, 833569, 761048497],
[914, 835396, 763551944],
[915, 837225, 766060875],
[916, 839056, 768575296],
[917, 840889, 771095213],
[918, 842724, 773620632],
[919, 844561, 776151559],
[920, 846400, 778688000],
[921, 848241, 781229961],
[922, 850084, 783777448],
[923, 851929, 786330467],
[924, 853776, 788889024],
[925, 855625, 791453125],
[926, 857476, 794022776],
[927, 859329, 796597983],
[928, 861184, 799178752],
[929, 863041, 801765089],
[930, 864900, 804357000],
[931, 866761, 806954491],
[932, 868624, 809557568],
[933, 870489, 812166237],
[934, 872356, 814780504],
[935, 874225, 817400375],
[936, 876096, 820025856],
[937, 877969, 822656953],
[938, 879844, 825293672],
[939, 881721, 827936019],
[940, 883600, 830584000],
[941, 885481, 833237621],
[942, 887364, 835896888],
[943, 889249, 838561807],
[944, 891136, 841232384],
[945, 893025, 843908625],
[946, 894916, 846590536],
[947, 896809, 849278123],
[948, 898704, 851971392],
[949, 900601, 854670349],
[950, 902500, 857375000],
[951, 904401, 860085351],
[952, 906304, 862801408],
[953, 908209, 865523177],
[954, 910116, 868250664],
[955, 912025, 870983875],
[956, 913936, 873722816],
[957, 915849, 876467493],
[958, 917764, 879217912],
[959, 919681, 881974079],
[960, 921600, 884736000],
[961, 923521, 887503681],
[962, 925444, 890277128],
[963, 927369, 893056347],
[964, 929296, 895841344],
[965, 931225, 898632125],
[966, 933156, 901428696],
[967, 935089, 904231063],
[968, 937024, 907039232],
[969, 938961, 909853209],
[970, 940900, 912673000],
[971, 942841, 915498611],
[972, 944784, 918330048],
[973, 946729, 921167317],
[974, 948676, 924010424],
[975, 950625, 926859375],
[976, 952576, 929714176],
[977, 954529, 932574833],
[978, 956484, 935441352],
[979, 958441, 938313739],
[980, 960400, 941192000],
[981, 962361, 944076141],
[982, 964324, 946966168],
[983, 966289, 949862087],
[984, 968256, 952763904],
[985, 970225, 955671625],
[986, 972196, 958585256],
[987, 974169, 961504803],
[988, 976144, 964430272],
[989, 978121, 967361669],
[990, 980100, 970299000],
[991, 982081, 973242271],
[992, 984064, 976191488],
[993, 986049, 979146657],
[994, 988036, 982107784],
[995, 990025, 985074875],
[996, 992016, 988047936],
[997, 994009, 991026973],
[998, 996004, 994011992],
[999, 998001, 997002999],
...]

``````
``````

In [ ]:

``````