diff --git "a/Boj/\352\270\260\353\263\270 \354\210\230\355\225\2311/1193.py" "b/Boj/\352\270\260\353\263\270 \354\210\230\355\225\2311/1193.py" new file mode 100644 index 0000000..e9b11c3 --- /dev/null +++ "b/Boj/\352\270\260\353\263\270 \354\210\230\355\225\2311/1193.py" @@ -0,0 +1,23 @@ +x = int(input()) +group = 0 +a = 0 +b = 0 +while x > group*(group+1)/2: + group = group+1 + +# 해당 그룹 내에서 몇번째? -> K +k = x - (group-1) * (group) // 2 + +if x == 1: + print("1/1") + exit(0) + +if group%2==0: + # 순방향 + a = k + b = group+1-a +else: + b = k + a = group+1-b + +print("%d/%d"%(a,b)) diff --git "a/Boj/\352\270\260\353\263\270 \354\210\230\355\225\2311/1712.py" "b/Boj/\352\270\260\353\263\270 \354\210\230\355\225\2311/1712.py" new file mode 100644 index 0000000..5873b81 --- /dev/null +++ "b/Boj/\352\270\260\353\263\270 \354\210\230\355\225\2311/1712.py" @@ -0,0 +1,10 @@ +a, b, c = map(int, input().split()) + +result = 0 + +if a + (b - c) * 2 >= a + b - c: + result = -1 + print(result) +else: + result = a//(c - b) + 1 + print(result) diff --git "a/Boj/\352\270\260\353\263\270 \354\210\230\355\225\2311/2292.py" "b/Boj/\352\270\260\353\263\270 \354\210\230\355\225\2311/2292.py" new file mode 100644 index 0000000..76392c0 --- /dev/null +++ "b/Boj/\352\270\260\353\263\270 \354\210\230\355\225\2311/2292.py" @@ -0,0 +1,13 @@ +n = int(input()) +room = 0 +count = 2 +while True: + if n == 1: + room = 1 + break + if count > n: + break + count = count + 6*room + room = room + 1 + +print(room) \ No newline at end of file diff --git "a/Boj/\352\270\260\353\263\270 \354\210\230\355\225\2311/2869.py" "b/Boj/\352\270\260\353\263\270 \354\210\230\355\225\2311/2869.py" new file mode 100644 index 0000000..ca536e8 --- /dev/null +++ "b/Boj/\352\270\260\353\263\270 \354\210\230\355\225\2311/2869.py" @@ -0,0 +1,5 @@ +import math +a, b, v = map(int, input().split()) +ans = math.ceil((v-b)/(a-b)) + +print(ans) \ No newline at end of file