[백준 10757번 c#] 큰 수 A+B
·
c#/백준알고리즘
using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; using System.Numerics; public class Program { public static void Main() { String[] str = Console.ReadLine().Split(' '); BigInteger a = BigInteger.Parse(str[0]); BigInteger b = BigInteger.Parse(str[1]); Console.WriteLine(a + b); } } c# 에서는 using System.Numerics; 에서 BigInteger을 통해 큰 수를 사..
[백준 2577번 c#] 숫자의 개수
·
c#/백준알고리즘
using System; using System.Text; public class Program { public static void Main() { StringBuilder sb = new StringBuilder(); int a= int.Parse(Console.ReadLine()); int b= int.Parse(Console.ReadLine()); int c= int.Parse(Console.ReadLine()); int a_b_c = a * b * c; String abc = a_b_c.ToString(); int[] abc2 = new int[abc.Length]; int[] answer = new int[10]; for (int i = 0; i < abc.Length; i++) { abc2[..
[백준15552번 c#] 빠른 A+B
·
c#/백준알고리즘
'빠른' 이 핵심 포인트이다 using System; using System.Text; public class Program { public static void Main() { int T = int.Parse(Console.ReadLine()); int[] a = new int[T]; int[] b = new int[T]; StringBuilder sb = new StringBuilder(); for (int i = 0; i < T; i++) { String[] strings = Console.ReadLine().Split(' '); a[i] = int.Parse(strings[0]); b[i] = int.Parse(strings[1]); sb.Append(a[i] + b[i]+"\n"); } Cons..