complete 2097.py
This commit is contained in:
19
zeta_python/completed/2097.py
Normal file
19
zeta_python/completed/2097.py
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# * * * * *
|
||||||
|
# * * or * * *
|
||||||
|
# * * * * *
|
||||||
|
if __name__ == "__main__":
|
||||||
|
N = int(input())
|
||||||
|
|
||||||
|
if N != 1:
|
||||||
|
sqn = 0
|
||||||
|
while sqn**2 < N:
|
||||||
|
sqn += 1
|
||||||
|
|
||||||
|
if (sqn - 1) * sqn > N:
|
||||||
|
a = (sqn - 2 + sqn - 1) * 2
|
||||||
|
else:
|
||||||
|
a = (sqn - 1) * 4
|
||||||
|
else:
|
||||||
|
a = 4
|
||||||
|
|
||||||
|
print(a)
|
||||||
Reference in New Issue
Block a user