본문 바로가기
Algorithm

[Codeup] Python 기초 100제(1)

by Jiseong 2021. 5. 22.

 

 

기초 100제 쭉 풀어보려한다.

 

[6034]

n1, n2 = input().split()
n1 = int(n1)
n2 = int(n2)
if n1 > n2 : print(n1 - n2)
else : print(n2 - n1)

 

[6035]

f1, f2 = input().split()
m = float(f1) * float(f2)
print(m)

[6036]

c, n = input().split()
print(c * int(n))

[6037]

n = input()
c = input()
print(c * int(n))

[6038]

n1, n2 = input().split()
print(int(n1)**int(n2))

[6039]

f1, f2 = input().split()
print(float(f1)**float(f2))

[6040]

n1, n2 = input().split()
print(int(n1)//int(n2))

[6041]

n1, n2 = input().split()
print(int(n1)%int(n2))

[6042]

f1 = float(input())
print(format(f1,".2f"))

[6043]

f1, f2 = input().split()
print(format(float(f1)/float(f2),".3f"))

[6044]

n1, n2 = input().split()
print(int(n1)+int(n2))
print(int(n1)-int(n2))
print(int(n1)*int(n2))
print(int(n1)//int(n2))
print(int(n1)%int(n2))
print(format(int(n1)/int(n2),".2f"))

[6045]

n1, n2, n3 = input().split()
n = int(n1)+int(n2)+int(n3)
print(n, format(n / 3,".2f"))

[6046]

n = int(input())
print(n<<1)

[6047]

n1, n2 = input().split()
n = int(n1)<<int(n2)
print(n)

[6048]

n1, n2 = input().split()
print(int(n1)<int(n2))

[6049]

n1, n2 = input().split()
print(int(n1)==int(n2))

[6050]

n1, n2 = input().split()
print(int(n1)<=int(n2))

[6051]

n1, n2 = input().split()
print(int(n1)!=int(n2))

[6052]

n = int(input())
print(bool(n))

댓글