From 0241857690c002ae5abc76a634041b93f5021a46 Mon Sep 17 00:00:00 2001 From: yenru0 Date: Thu, 23 Apr 2020 21:05:31 +0900 Subject: [PATCH] =?UTF-8?q?=EB=8C=80=EC=B6=A9=20BOJ=20=EC=88=98=ED=95=991?= =?UTF-8?q?=EC=9D=B4=20=EB=8C=80=EC=B6=A9=20=ED=95=98=EB=82=98=20=EB=82=A8?= =?UTF-8?q?=EA=B8=B0=EA=B3=A0=20=EB=81=9D=EB=82=AC=EB=8B=A4=EB=8A=94=20?= =?UTF-8?q?=EB=8C=80=EC=B6=A9=EA=B8=80=EC=97=90=20=EB=8C=80=ED=95=98?= =?UTF-8?q?=EC=97=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zeta_python/1193.py | 0 zeta_python/completed/10250.py | 4 ++++ zeta_python/completed/1193.py | 9 +++++++++ zeta_python/completed/2775.py | 13 +++++++++++++ zeta_python/completed/2869.py | 2 ++ 5 files changed, 28 insertions(+) delete mode 100644 zeta_python/1193.py create mode 100644 zeta_python/completed/10250.py create mode 100644 zeta_python/completed/1193.py create mode 100644 zeta_python/completed/2775.py create mode 100644 zeta_python/completed/2869.py diff --git a/zeta_python/1193.py b/zeta_python/1193.py deleted file mode 100644 index e69de29..0000000 diff --git a/zeta_python/completed/10250.py b/zeta_python/completed/10250.py new file mode 100644 index 0000000..519a83c --- /dev/null +++ b/zeta_python/completed/10250.py @@ -0,0 +1,4 @@ +T = int(input()) +for i in range(T): + H, W, N = map(int, input().split()) + print("%d%02d"%((N-1)%H+1,(N-1)//H+1)) \ No newline at end of file diff --git a/zeta_python/completed/1193.py b/zeta_python/completed/1193.py new file mode 100644 index 0000000..c7ffc01 --- /dev/null +++ b/zeta_python/completed/1193.py @@ -0,0 +1,9 @@ +S = lambda n: n*(n+1)//2 +N = int(input()) +nor = round((2*N)**.5) +t = N - S(nor-1) +k = S(nor) - S(nor-1) +if nor % 2: + print("%d/%d"%(k-t+1, t)) +else: + print("%d/%d"%(t, k-t+1)) diff --git a/zeta_python/completed/2775.py b/zeta_python/completed/2775.py new file mode 100644 index 0000000..a394b7a --- /dev/null +++ b/zeta_python/completed/2775.py @@ -0,0 +1,13 @@ +def fact(x): + temp = 1 + for i in range(1, x+1): + temp *= i + return temp +def comb(n, r): + return fact(n)//(fact(n-r)*fact(r)) +N = int(input()) +for i in range(N): + k = int(input()) + 1 + h = int(input()) - 1 + print(comb(k+h, h)) + \ No newline at end of file diff --git a/zeta_python/completed/2869.py b/zeta_python/completed/2869.py new file mode 100644 index 0000000..f675f64 --- /dev/null +++ b/zeta_python/completed/2869.py @@ -0,0 +1,2 @@ +A, B, V = map(int, input().split()) +print((V-B-1)//(A-B)+1) \ No newline at end of file