djdj - HTMLify profile

djdj
471 Files
103469 Views
Latest files of /djdj/me/problems/hackerrank
if __name__ == '__main__':
n = int(input())
for i in range(1,n+1):
print(i,end="")
n = int(input())
for i in range(1,n+1):
print(i,end="")
def is_leap(year):
leap = False
return leap
year = int(input())
print(is_leap(year))
leap = False
return leap
year = int(input())
print(is_leap(year))
def is_leap(year):
if year%100==0:
if year%400==0:
return True
else:
return False
else:
if year%4==0:
if year%100==0:
if year%400==0:
return True
else:
return False
else:
if year%4==0:
if n % 2 != 0: # odd
print("Weird")
if n % 2 == 0: # even
if 2 < n < 5:
print("Not Weird")
if 6 < n <= 20:
print("Weird")
if n > 20:
print("Weird")
if n % 2 == 0: # even
if 2 < n < 5:
print("Not Weird")
if 6 < n <= 20:
print("Weird")
if n > 20:
a = int(input())
b = int(input())
print(a+b)
print(a-b)
print(a*b)
b = int(input())
print(a+b)
print(a-b)
print(a*b)