This website works better with JavaScript.
Home
Explore
Help
Sign In
titouan
/
hackerrank
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
Solved Halloween Party
main
Titouan Rigoudy
11 years ago
parent
e4fcc79687
commit
b068e69116
1 changed files
with
16 additions
and
0 deletions
Unified View
Diff Options
Show Stats
Download Patch File
Download Diff File
+16
-0
halloween_party/halloween_party,py
+ 16
- 0
halloween_party/halloween_party,py
View File
@ -0,0 +1,16 @@
#!/usr/bin/python3
# https://www.hackerrank.com/challenges/halloween-party
import sys
def max_pieces(n):
return (n // 2) * ((n+1) // 2)
def main():
T = int(sys.stdin.readline())
for _ in range(T):
print(max_pieces(int(sys.stdin.readline())))
if __name__ == '__main__':
main()
Write
Preview
Loading…
Cancel
Save