Skip to content

Instantly share code, notes, and snippets.

View Svastikkka's full-sized avatar
🏛️
Working from Gift City

Manshu Sharma Svastikkka

🏛️
Working from Gift City
View GitHub Profile
## Read input as specified in the question.
## Print output as specified in the question.
num,power=list(map(int,input().split()))
print(num**power)
## Read input as specified in the question.
## Print output as specified in the question.
num = int(input())
for i in range(1,num+1):
for j in range(0,i):
print(1,end="")
print()
## Read input as specified in the question.
## Print output as specified in the question.
num=int(input())
for i in range(1,num+1):
for j in range(0,i):
x=i-1
if x==0:
print(1,end="")
else:
if x==j or j==0:
## Read input as specified in the question.
## Print output as specified in the question.
num=int(input())
for i in range(1,num+1):
for j in range(0,i):
x=i-1
if x==0:
print(1,end="")
else:
if x==j or j==0:
## Read input as specified in the question.
## Print output as specified in the question.
num = int(input())
for i in range(0,num):
for j in range(1,num+1-i):
print(j,end="")
print()
## Read input as specified in the question.
## Print output as specified in the question.
l=['A','B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
num=int(input())
c=0
for i in range(1,num+1):
for j in range(0,i):
print(l[i-1],end="")
print()
c=c+1
## Read input as specified in the question.
## Print output as specified in the question.
ch=input()
a,b,c=list(map(int,input().split()))
print(ch)
print(int(round(a+b+c)/3))
ch=input()
if ch.isupper():
print(1)
elif ch.islower():
print(0)
else:print(-1)
## Read input as specified in the question.
## Print output as specified in the question.
n=int(input())
sum=0
for i in range(1,n+1):
if (sum+i)%2==0:
sum=sum+i
print(sum)
# Read input as sepcified in the question
# Print output as specified in the question
## Note : For printing multiple values in one line, put them inside print separated by space.
## You can follow this syntax for printing values of two variables val1 and val2 separaetd by space -
## print(val1, " ", val2)
s=int(input())
e=int(input())
w=int(input())