Skip to content

Instantly share code, notes, and snippets.

@prkagrawal
Created July 5, 2020 04:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prkagrawal/de68c1bfb2a979a43cf4c775e90efa32 to your computer and use it in GitHub Desktop.
Save prkagrawal/de68c1bfb2a979a43cf4c775e90efa32 to your computer and use it in GitHub Desktop.
#dailyCoding
t = int(input())
while(t>0):
t = t - 1
n = int(input())
if(n==1) :
print(1)
continue
if(n%2==0):
print(int(n/2))
continue
if(n%2==1):
print(int((n-1)/2) + 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment