Algorithm/BOJ

Algorithm/BOJ

[BOJ] 약수 2501번 C# 사용 풀이

문제 문제풀이 using System; using System.Collections.Generic; using System.IO; namespace BOJ2501 { internal class Program { static void Main(string[] args) { StreamReader sr = new StreamReader(Console.OpenStandardInput()); StreamWriter sw = new StreamWriter(Console.OpenStandardOutput()); int[] NK = Array.ConvertAll(sr.ReadLine().Split(), int.Parse); int N = NK[0]; int K = NK[1]; List measureList = new..

Algorithm/BOJ

[BOJ] 통계학 C#사용 풀이 - 미해결

문제 코드 using System; using System.Collections.Generic; using System.IO; namespace BOJ2108 { internal class Program { static int[] count = new int[8001]; static void Main(string[] args) { StreamReader sr = new StreamReader(Console.OpenStandardInput()); StreamWriter sw = new StreamWriter(Console.OpenStandardOutput()); int N = int.Parse(sr.ReadLine()); int[] numList = new int[N]; float sum = 0; for ..

Algorithm/BOJ

[BOJ] 1297번 TV 크기 C# 사용 풀이

문제 문제풀이 using System; using System.IO; namespace BOJ1297 { internal class Program { static void Main(string[] args) { StreamReader sr = new StreamReader(Console.OpenStandardInput()); StreamWriter sw = new StreamWriter(Console.OpenStandardOutput()); int[] DHW = Array.ConvertAll(sr.ReadLine().Split(), int.Parse); double D = DHW[0]; // 대각선 길이 double H = DHW[1]; // 높이 비율 double W = DHW[2]; // 너비 비율 ..

Algorithm/BOJ

[BOJ] 2581번 소수 C# 사용 풀이

초반에 예외 처리를 잘못하여 다시 작성하였다;;; 문제 처음 틀린 풀이 using System; using System.Collections.Generic; using System.IO; using System.Linq; namespace BOJ2581 { internal class Program { static void Main(string[] args) { StreamReader sr = new StreamReader(Console.OpenStandardInput()); StreamWriter sw = new StreamWriter(Console.OpenStandardOutput()); int M = int.Parse(sr.ReadLine()); int N = int.Parse(sr.ReadLine(..

Algorithm/BOJ

[BOJ] 2605번 줄세우기 C# 사용 풀이

문제 풀이 using System; using System.Collections.Generic; using System.IO; namespace BOJ_11945 { internal class Program { static void Main(string[] args) { StreamWriter sw = new StreamWriter(Console.OpenStandardOutput()); StreamReader sr = new StreamReader(Console.OpenStandardInput()); int N = int.Parse(sr.ReadLine()); int[] 번호표 = Array.ConvertAll(sr.ReadLine().Split(), int.Parse); List lines = new ..

Algorithm/BOJ

[BOJ] 5524번 입실 관리 C# 문제 풀이

문제 코드 using System; using System.IO; namespace BOJ_11945 { internal class Program { static void Main(string[] args) { StreamWriter sw = new StreamWriter(Console.OpenStandardOutput()); StreamReader sr = new StreamReader(Console.OpenStandardInput()); int N = int.Parse(sr.ReadLine()); string[] names = new string[N]; for (int i = 0; i < N; i++) { names[i] = sr.ReadLine().ToLower(); sw.WriteLine(name..

Algorithm/BOJ

[BOJ]11945번 뜨거운 붕어빵 C# 사용 풀이

문제 풀이 using System; using System.Collections.Generic; using System.IO; using System.Linq; namespace BOJ_11945 { internal class Program { static void Main(string[] args) { StreamWriter sw = new StreamWriter(Console.OpenStandardOutput()); StreamReader sr = new StreamReader(Console.OpenStandardInput()); int[] NM = Array.ConvertAll(sr.ReadLine().Split(), int.Parse); int N = NM[0]; int M = NM[1]; str..

Algorithm/BOJ

[BOJ] 4796번 캠핑 C#사용 알고리즘 풀이

문제 풀이 using System; using System.Collections.Generic; using System.IO; namespace BOJ4796 { internal class Program { static string input; static int L; static int P; static int V; static int cnt; static int sum; static List strNums = new List(); static void Main(string[] args) { StreamReader sr = new StreamReader(Console.OpenStandardInput()); StreamWriter sw = new StreamWriter(Console.OpenStandar..

Algorithm/BOJ

[BOJ] 1343번 폴리오미노 - C# 사용 - 미해결

문제 풀이 using System; using System.Collections.Generic; using System.IO; using System.Linq; namespace BOJ1343 { internal class Program { static void Main(string[] args) { StreamReader sr = new StreamReader(Console.OpenStandardInput()); StreamWriter sw = new StreamWriter(Console.OpenStandardOutput()); List completeWords = new List(); List finalWords = new List(); int wrong = 0; string input = sr.Re..

Algorithm/BOJ

[BOJ] 2864 5와 6의 차이 c# 사용 풀이

https://www.acmicpc.net/problem/2864 문제 풀이 using System; using System.IO; namespace BOJ_2864 { internal class Program { static int sum1; static int sum2; static void Main(string[] args) { StreamReader sr = new StreamReader(Console.OpenStandardInput()); StreamWriter sw = new StreamWriter(Console.OpenStandardOutput()); string[] AB = sr.ReadLine().Split(); string A = AB[0]; string B = AB[1]; char[]..

Bueong_E
'Algorithm/BOJ' 카테고리의 글 목록 (2 Page)