This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Read input as specified in the question. | |
## Print output as specified in the question. | |
num,power=list(map(int,input().split())) | |
print(num**power) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ch=input() | |
if ch.isupper(): | |
print(1) | |
elif ch.islower(): | |
print(0) | |
else:print(-1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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()) |