Skip to content

Commit

Permalink
[#3] 2021.12.19 백준단계별8.기본수학 4문제
Browse files Browse the repository at this point in the history
  • Loading branch information
hyesuuou committed Dec 20, 2021
1 parent 8730864 commit 3a9d0c6
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Boj/기본 수학1/10250.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
t = int(input())

for i in range(t):
h, w, n = map(int, input().split())
x = 0
# n = h*y+x
while n > h * x:
x = x + 1

y = n - h * (x - 1)
x = str(x).zfill(2)
y = str(y)
print("%s%s" % (y, x))
2 changes: 2 additions & 0 deletions Boj/기본 수학1/10757.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
a, b = map(int, input().split())
print(a+b)
19 changes: 19 additions & 0 deletions Boj/기본 수학1/2775.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
t = int(input())
array = [[0 for col in range(15)] for row in range(15)]

for i in range(0, 15):
array[0][i] = 1

for i in range(0, 15):
array[i][0] = i


for i in range(0, 15):
for j in range(1, 15):
array[i][j] = array[i-1][j] + array[i][j-1]


for i in range(t):
k = int(input())
n = int(input())
print(array[n][k])
20 changes: 20 additions & 0 deletions Boj/기본 수학1/2839.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
n = int(input())
list = []
a = 0
isTrue = False
while 5*a <= n:
b = (n-5*a) % 3
if b == 0:
list.append(a+((n-5*a) // 3))
isTrue = True
a = a + 1

if isTrue == False:
print(-1)
exit(0)

min = list[0]
for i in range(len(list)):
if list[i] < min:
min = list[i]
print(min)

0 comments on commit 3a9d0c6

Please sign in to comment.