반응형 코딩테스트 준비/백준 C#161 백준 C# 2480 using System; namespace baek2 { class Program { static void Main(string[] args) { string input = Console.ReadLine(); string[] token = input.Split(' '); int A = int.Parse(token[0]); int B = int.Parse(token[1]); int C = int.Parse(token[2]); int money = 0; if (A == C && B == C && A == C) money = 10000 + A * 1000; else if (A == C || A == B) money = 1000 + 100 * A; else if (B == C) money = 1000 + 100.. 2023. 4. 7. 백준 C# 2525 using System; namespace baek2 { class Program { static void Main(string[] args) { string input = Console.ReadLine(); string[] token = input.Split(' '); string input_minute = Console.ReadLine(); int A = int.Parse(token[0]); int B = int.Parse(token[1]); int C = int.Parse(input_minute); int D = ((B + C) / 60); if ( (B + C) >= 60) { A += ((B + C) / 60); if (A >= 24) { A -= 24; B += C - (60 * D); } e.. 2023. 4. 7. 백준 C# 2884 using System; namespace baek2 { class Program { static void Main(string[] args) { string input = Console.ReadLine(); string[] token = input.Split(' '); int h = int.Parse(token[0]); int m = int.Parse(token[1]); if( (m - 45) < 0) { if (h == 0) { h = 23; m = 60 + m - 45; } else { h--; m = 60 + m - 45; } } else { m -= 45; } Console.WriteLine($"{h} {m}"); } } } 2023. 4. 7. 백준 C# 14681 using System; namespace baek2 { class Program { static void Main(string[] args) { string input_x = Console.ReadLine(); string input_y = Console.ReadLine(); int x = int.Parse(input_x); int y = int.Parse(input_y); if ((x > 0 ) && (y > 0)) Console.WriteLine(1); else if ((x 0)) Console.WriteLine(2); else if ((x < 0) && (y < 0)) Console.WriteLine(3); else Console.WriteLine(4); } } } 2023. 4. 7. 백준 C# 2753 using System; namespace baek2 { class Program { static void Main(string[] args) { string year_input = Console.ReadLine(); int year = int.Parse(year_input); if ((year % 4 == 0) && (year % 100 != 0)) Console.WriteLine(1); else if ((year % 100 == 0) && (year % 400 == 0)) Console.WriteLine(1); else Console.WriteLine(0); } } } 2023. 4. 7. 백준 C# 9498 using System; namespace baek2 { class Program { static void Main(string[] args) { string score_input = Console.ReadLine(); int score = int.Parse(score_input); if (score >= 90 && score = 80 && score = 70 && score = 60 && score 2023. 4. 7. 이전 1 ··· 22 23 24 25 26 27 다음 반응형