using System; class Program { static void Main(string[] args) { int total = 0; for (int i = 0; i < 5; i++) { string stringN = Console.ReadLine(); int intN = Convert.ToInt32(stringN); total += intN; } Console.WriteLine(total); } } 문제 출처 https://www.acmicpc.net/problem/5522 5522번: 카드 게임 JOI군은 카드 게임을 하고 있다. 이 카드 게임은 5회의 게임으로 진행되며, 그 총점으로 승부를 하는 게임이다. JOI군의 각 게임의 득점을 나타내는 정수가 주어졌을 때, JOI군의 총점을 구하는 프..
using System; using System.Numerics; class Program { static void Main(string[] args) { string stringNumber = Console.ReadLine(); int number = int.Parse(stringNumber); for (int i = 0; i < number; i++) { string stringPassword = Console.ReadLine(); if (5 < stringPassword.Length && stringPassword.Length < 10) { Console.WriteLine("yes"); } else { Console.WriteLine("no"); } } } } 문제 출처 https://www.acm..
using System; using System.Numerics; class Program { static void Main(string[] args) { string stringA = Console.ReadLine(); string stringB = Console.ReadLine(); BigInteger A = BigInteger.Parse(stringA); BigInteger B = BigInteger.Parse(stringB); Console.WriteLine(A + B); Console.WriteLine(A - B); Console.WriteLine(A * B); } } 문제 출처 https://www.acmicpc.net/problem/2338 2338번: 긴자리 계산 첫째 줄에 A+B, 둘째 ..
using System; using System.Numerics; class Program { static void Main(string[] args) { string stringInput = Console.ReadLine(); string[] arrayStrings = stringInput.Split(' ', StringSplitOptions.None); BigInteger N = BigInteger.Parse(arrayStrings[0]); BigInteger M = BigInteger.Parse(arrayStrings[1]); BigInteger divided = N / M; BigInteger remained = N % M; Console.WriteLine(divided); Console.Writ..
using System; using System.Numerics; class Program { static void Main(string[] args) { string stringInput = Console.ReadLine(); string[] arrayStrings = stringInput.Split(' ', StringSplitOptions.None); BigInteger A = BigInteger.Parse(arrayStrings[0]); BigInteger B = BigInteger.Parse(arrayStrings[1]); Console.WriteLine(A + B); } } 문제 출처 https://www.acmicpc.net/problem/10757 10757번: 큰 수 A+B 두 정수 A와..
using System; class Program { static void Main(string[] args) { string stringInput = Console.ReadLine(); string[] array = stringInput.Split(' ', StringSplitOptions.None); long a = System.Convert.ToInt64(array[0]); long b = System.Convert.ToInt64(array[1]); long result = 0; if (a < b) { result = b - a; } else { result = a - b; } result = Math.Abs(result); Console.WriteLine(result); } } 문제 출처 http..