#6041 - ์ ์ 2๊ฐ ์ ๋ ฅ๋ฐ์ ๋๋ ๋๋จธ์ง ๊ณ์ฐํ๊ธฐ
a, b = map(int,input().split(" "))
print(a%b)
#6042 - ์ค์ 1๊ฐ ์ ๋ ฅ๋ฐ์ ์์ซ์ ์ดํ ์๋ฆฌ ๋ณํํ๊ธฐ
a = float(input())
print(format(a,".2f"))
๋ถ์ > format(a, ".2f") ๋ ์์ซ์ ์ดํ ๋๋ฒ์งธ ์๋ฆฌ๊น์ง ๋ํ๋ผ ๋ ์ด์ฉํ๋ค.
#6043 - ์ค์ 2๊ฐ ์ ๋ ฅ๋ฐ์ ๋๋ ๊ฒฐ๊ณผ ๊ณ์ฐํ๊ธฐ
a, b = map(float, input().split(" "))
print(format((a/b),".3f"))
#6044 - ์ ์ 2๊ฐ ์ ๋ ฅ๋ฐ์ ์๋ ๊ณ์ฐํ๊ธฐ
a,b = map(int,input().split(" "))
print(a+b)
print(a-b)
print(a*b)
print(a//b)
print(a%b)
print(format((a/b),".2f"))
#6045 - ์ ์ 3๊ฐ ์ ๋ ฅ๋ฐ์ ํฉ๊ณผ ํ๊ท ์ถ๋ ฅํ๊ธฐ
a,b,c = map(int,input().split(" "))
print(a+b+c,end=" ")
i = a+b+c
print(format((i/3),".2f"))
#6046 - ์ ์ 1๊ฐ ์ ๋ ฅ๋ฐ์ 2๋ฐฐ ๊ณฑํด ์ถ๋ ฅํ๊ธฐ
a = int(input())
print(a<<1)
๋ถ์ > ์ผ์ชฝ ๋นํธ์ํํธ(<<)๊ฐ ๋ ๋์๋ ์ค๋ฅธ์ชฝ์ 0์ด ์ฃผ์ด์ง ๊ฐ์๋งํผ ์ถ๊ฐ๋๊ณ , ์ค๋ฅธ์ชฝ ๋นํธ์ํํธ(>>)๊ฐ ๋ ๋์๋ ์ผ์ชฝ์ 0(0 ๋๋ ์์ ์ ์์ธ ๊ฒฝ์ฐ)์ด๋ 1(์์ ์ ์์ธ ๊ฒฝ์ฐ)์ด ๊ฐ์๋งํผ ์ถ๊ฐ๋๊ณ , ๊ฐ์ฅ ์ค๋ฅธ์ชฝ์ ์๋ 1๋นํธ๋ ์ฌ๋ผ์ง๋ค.
#6047 - 2์ ๊ฑฐ๋ญ์ ๊ณฑ ๋ฐฐ๋ก ๊ณฑํด ์ถ๋ ฅํ๊ธฐ
a,b = map(int,input().split(" "))
print(a*(2**b))
#6048 - ์ ์ 2๊ฐ ์ ๋ ฅ๋ฐ์ ๋น๊ตํ๊ธฐ 1
a,b = map(int,input().split(" "))
if a < b:
print("True")
else:
print("False")
#6049 - ์ ์ 2๊ฐ ์ ๋ ฅ๋ฐ์ ๋น๊ตํ๊ธฐ 2
a,b = map(int,input().split(" "))
if a == b:
print("True")
else:
print("False")
#6050 - ์ ์ 2๊ฐ ์ ๋ ฅ๋ฐ์ ๋น๊ตํ๊ธฐ 3
a,b = map(int,input().split(" "))
if b >= a:
print("True")
else:
print("False")
#6051 - ์ ์ 2๊ฐ ์ ๋ ฅ๋ฐ์ ๋น๊ตํ๊ธฐ 4
a,b = map(int,input().split(" "))
if b != a:
print("True")
else:
print("False")
'Algorithm > Codeup' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[Codeup] ์ฝ๋์ ๊ธฐ์ด 100์ Python #6052 ~ #6060 (0) | 2022.03.30 |
---|---|
[Codeup] ์ฝ๋์ ๊ธฐ์ด 100์ Phython #6031 ~ #6040 (0) | 2022.03.26 |
[Codeup] ์ฝ๋์ ๊ธฐ์ด 100์ Phython #6021 ~ #6030 (0) | 2022.03.24 |
[Codeup] ์ฝ๋์ ๊ธฐ์ด 100์ Python #6001 ~ #6020 (0) | 2022.03.23 |