반응형
SMALL
문제
풀이
using System;
using System.IO;
namespace _1181
{
class Program
{
static void Main(string[] args)
{
StreamReader sr = new StreamReader(Console.OpenStandardInput());
StreamWriter sw = new StreamWriter(Console.OpenStandardOutput());
int[] list = Array.ConvertAll(sr.ReadLine().Split(' '), int.Parse);
int A = list[0];
int B = list[1];
int V = list[2];
double day = 0;
day = (V - B) / (A - B);
if ((V - B) % (A - B) != 0)
{
day++;
}
sw.WriteLine(day);
sr.Close();
sw.Flush();
sw.Close();
}
}
}
결과창
2 1 5 입력시
반응형
LIST
'Algorithm > BOJ' 카테고리의 다른 글
[BOJ] 10989번 수 정렬하기 3 C# 사용 못풀이 (해결) (2) | 2023.01.26 |
---|---|
[BOJ] 1436번 영화감독 숌 C# 사용 풀이 (0) | 2023.01.25 |
[BOJ] 9012 괄호 (0) | 2023.01.24 |
[프로그래머스] 전화번호 목록 C# 풀이 (0) | 2023.01.24 |
[프로그래머스] 다트게임 C#풀이 (0) | 2023.01.23 |