Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Abhayparashar31/29976dfcbcfa91731c8cecfee7886ab5 to your computer and use it in GitHub Desktop.
Save Abhayparashar31/29976dfcbcfa91731c8cecfee7886ab5 to your computer and use it in GitHub Desktop.
num = int(input())
for i in range(0,num):
number = int(input())
if number<38:
print(number)
elif number%5==0:
print(number)
elif number%5!=0:
rem = number%5
if rem>=3:
neg_rem = 5-rem
ans = number+neg_rem
print(ans)
elif rem<3:
print(number)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment