일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
- 대구데이트
- 백준
- 대명동맛집
- C#
- BFS
- 대구고깃집
- 수성구데이트
- 들안길삼겹살
- 정렬
- 큐
- 수성못맛집
- 앞산카페
- 오라클
- 반복문
- 프로그래머스
- 안지랑카페
- 대구카페
- 수성구맛집
- programmers
- 압구정데이트
- 범어동맛집
- 별찍기
- oracle
- 브루트 포스
- 서울맛집
- SQL
- 대구삼겹살
- 대구맛집
- 조건문
- 수성못삼겹살
- Today
- Total
목록코딩 공부/C# (100)
모든 일상

using System; namespace ConsoleApp10 { class Program { static void Main(string[] args) { int size = int.Parse(Console.ReadLine()); string[] arr = new string[size]; int[] result = new int[size]; for (int i = 0; i

문제 이해하는데 오래 걸린 문제이다. 예제 입력 1로 설명을 하자면 40 60 80 이 점수이고 이 값들을 합한 180을 최고점 80 으로 나눈후 100을 곱해준다. 그럼 225라는 값이 나오는데 그 값을 총 3과목이니까 3으로 나눠준다. using System; namespace ConsoleApp9 { class Program { static void Main(string[] args) { int size = int.Parse(Console.ReadLine()); string str = Console.ReadLine(); string[] arr = str.Split(); int max = 0, sum = 0; for(int i = 0; i max) max = int.Parse(arr[i]); sum ..

using System; namespace ConsoleApp9 { class Program { static void Main(string[] args) { int[] arr = new int[10]; int result = 0; for(int i = 0; i

public class Solution { public long solution(long n) { long answer = 0; long result = 0; for (long i = 1; in) break; } if (result == 0) answer = -1; else answer = result * result; return answer; } }

public class Solution { public string solution(int num) { string answer = ""; if (num % 2 == 0) { answer = "Even"; } else if (num % 2 != 0) { answer = "Odd"; } return answer; } }

public class Solution { public int solution(int num) { long num2 = num; // int num2를 하게되며 int 형의 범위를 벗어나는 값이 들어와 결과가 달라진다. int answer = 0; while(num2 > 1) { if (num2 % 2 == 0) num2 = num2 / 2; else num2 = num2 * 3 + 1; answer++; } if (answer >= 500) return -1; else return answer; } }

public class Solution { public double solution(int[] arr) { int add = 0; for (int i = 0; i