# ๐ฅBaekjoon start๐ฅ

arielยท2021๋ 11์ 15์ผ
0

๋ชฉ๋ก ๋ณด๊ธฐ
9/14

# 2021-11-16

โ์ช ์ ํจ๊ป ํ๋ฃจ์ 30๋ถ ์ด์ ์์โจ

#### 1712

import java.util.Scanner;

public class Main {

static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {

Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
int C = sc.nextInt();

if(C<=B) {
System.out.println("-1");
}
else {
System.out.println((A/(C-B))+1);
}

}
}

#### 2292

import java.util.Scanner;

public class Main {

static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {

Scanner sc = new Scanner(System.in);
int room = 1;
int count = 1;

int number = 0;
room= sc.nextInt();
for(int i=0; i<100000000; i++) {
number += i*6;
if((number)<room) {
count++;

}
else {
break;
}
}
System.out.println(count);

}
}

#### 2292

import java.util.Scanner;

public class Main {
public static void main(String[] args) {

Scanner sc = new Scanner(System.in);

int N = sc.nextInt();
int count = 1; //๊ฒน ์ (์ต์ ๋ฃจํธ)
int range = 2; //๋ฒ์(์ต์๊ฐ ๊ธฐ์ค)

if(N == 1) { //1์ผ ๊ฒฝ์ฐ ๋ฐ๋ก ์ถ๋ ฅ
System.out.print(1);
}else {
while(range<=N) { //๋ฒ์๊ฐ N๋ณด๋ค ์ปค์ง๊ธฐ ์ง์ ๊น์ง ๋ฐ๋ณต
range = range + (6 * count); //๋ค์ ๋ฒ์์ ์ต์๊ฐ์ผ๋ก ์ด๊ธฐํ
count++; //count 1์ฆ๊ฐ
}
System.out.print(count);
}
}
}

#### 1193

import java.util.Scanner;

public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);

int N =sc.nextInt();

int cc = 1, pcs = 0;
while(true) {
//์ง์  ๋๊ฐ์  ๋์ ํฉ + ํด๋น ๋๊ฐ์  ๊ฐ์ ์ด์ฉํ ๋ฒ์ ํ๊ฒฐ
if(N <= pcs + cc) {
if(cc % 2 == 1) { // ๋๊ฐ์ ์ ๊ฐ์๊ฐ ํ์๋ผ๋ฉด
//๋ถ๋ชจ๊ฐ ํฐ ์๋ถํฐ ์์
//๋ถ๋ชจ๋ ๋๊ฐ์  ๊ฐ์ - (N ๋ฒ์งธ - ์ง์  ๋๊ฐ์ ๊น์ง์ ๋์ ํฉ - 1)
//๋ถ์๋ X ๋ฒ์งธ - ์ง์  ๋๊ฐ์ ๊น์ง์ ๋์ ํฉ
System.out.print((cc - (N - pcs - 1))+"/"+(N - pcs));
break;
}else {//๋๊ฐ์ ์ ๊ฐ์๊ฐ ์ง์๋ผ๋ฉด
//ํ์์ผ ๋์ ์ถ๋ ฅ์ ๋ฐ๋๋ก
System.out.print((N - pcs)+"/"+(cc - (N - pcs -1)));
break;
}
}else {
pcs += cc;
cc++;
}
}
}
}

#### 2869

import java.util.Scanner;

public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);

int A =sc.nextInt();
int B =sc.nextInt();
int V =sc.nextInt();

int day = (V-B)/(A-B);

//๋๋จธ์ง๊ฐ ์์ ๊ฒฝ์ฐ
if((V - B) % (A - B) != 0) {
day++;
}
System.out.println(day);
}
}