-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcutting_list.py
executable file
·61 lines (53 loc) · 1.05 KB
/
cutting_list.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
##v = input("::")
##
##first = range(1,v+1)
##first.reverse()
##
##stop = ""
##
##while stop != "s":
## try:
## print first
##
## me = first[3]
## us = first[0]
## you = us - me
##
## first = range(1,you+1)
## first.reverse()
## print you
## except:
## stop = "s"
##def answer(area):
## import math
## the_number= 0
## squares = []
## for number in range(area-1, 0, -1):
## root = math.sqrt(number)
## if root.is_integer():
## # print the_number
## squares.append(number)
## number = area - number
## # elif sum(squares) == area:
##
## return squares
##print answer(12)
##area = input()
##def answer(area):
## val = []
## import math
## test = range(area)
## test.reverse()
## for n in test:
## if math.sqrt(n).is_integer():
## new_m = n
## val.append(n)
## break
## area = test[0] - new_m
## print val
num = input("::")
us = range(1,num+1)
tot = 0
for i in us:
tot += i
print tot