Skip to content

Commit

Permalink
idk
Browse files Browse the repository at this point in the history
Signed-off-by: MisileLab <[email protected]>
  • Loading branch information
MisileLab committed Sep 18, 2023
1 parent 8eb8ed4 commit 15bdd48
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions projects/xobusy/bojs/17954.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
from math import ceil
a, b = (False, False)
c = [[],[]]
d = int(input())
e = 0
_cac = ceil((d*2) / 4)

for i in range(1, d*2+1):
if a:
if not b:
c[0].insert(0, i)
else:
c[0].insert(-1, i)
a = not a
elif not b:
c[1].insert(0, i)
else:
c[1].insert(-1, i)
a = not a
b = not b
t = ceil(i / 4)
e += (_cac-t) * i

if d % 2 == 1:
c[0].insert(-1, max(c[1][0], c[1][-1]))
c[1].remove(max(c[1][0], c[1][-1]))

print(e)
print(*c[0])
print(*c[1])
File renamed without changes.

0 comments on commit 15bdd48

Please sign in to comment.