[백준 2004번 c#] 조합 0의 개수
·
c#/백준알고리즘
- 조합: n!/(n-r)!r! 1. n!의 2,5 개수 , (n-r)! 의 2,5의 개수, (r!)의 2,5의 개수 구하기 2. n!의 2의 수에서 (n-r)! 와 r! 2의 수 더한거를 빼준다 3. n!의 5의 수에서 (n-r)! 와 r! 5의 수 더한거를 빼준다 4. 2,3번 중에 더 작은 값이 정답 using System; using System.Collections; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Project2 { class Class1 { static void Main(string[] args)..
[9375번 c#]패션왕 신해빈
·
c#/백준알고리즘
- c# 에서는 dictionary의 키에 대한 값에 접근할 때, 배열처럼 접근할 수 있다. - 만일, 같은 키값을 가진 값을 넣고 싶다면 dictionary로 넣을 수 있다. - 해당 문제는 조합 문제로, 옷의 종류에 각각 몇개씩 있는지 확인 후, (ㅁ+1)* (o+1) -1 로 구하면 된다. using System; using System.Collections; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Project2 { class Class1 { static void Main(string[] args) { Str..
[1934번 c#] 최소공배수
·
c#/백준알고리즘
두 수를 곱한 값 -> 최대공약수 x 최소공배수 재귀를 이용하여 최대공약수와 최소공배수를 찾아준다. using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Project2 { class Class1 { static void Main(string[] args) { StreamWriter writer = new StreamWriter(Console.OpenStandardOutput()); StreamReader reader = new StreamReader(Console.OpenStandardInput()); ..
[유니티] 드리프트 구현 및 충돌 탐지 구현
·
게임 개발
https://heeyeon9578.notion.site/bce98c4a7182452e9ff6fb27eeabfbb9 아케이드 게임 구현 드리프트 및 가속도 구현 heeyeon9578.notion.site
[백준 2798번 c#] 블랙잭
·
c#/백준알고리즘
브루트포스 알고리즘 이 쓰인 문제이다. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Project2 { class Class1 { static void Main(string[] args) { //N,M 값 입력 string[] N_M = Console.ReadLine().Split(); int N = int.Parse(N_M[0]); int M = int.Parse(N_M[1]); //카드에 쓰여진 수 입력 string[] nums = Console.ReadLine().Split(); int[] numsInt = new int..
[유데미] "쉽게 배우는 C# 알고리즘 입문" 리뷰
·
대외활동/starters 부트캠프 feat.웅진씽크빅
최근에 c#에 대해 공부하면서, "알고리즘"에 관심이 생겼습니다. 기본적인 문법 말고, 알고리즘에 대해서만 알려줄 강의가 없나 찾아봤습니다. 프로그래밍 관련한 인기 인강 사이트인 "유데미" 에서 c# 알고리즘을 검색하니, "쉽게 배우는 C# 알고리즘 입문" 강의가 추천으로 나왔습니다. 강의도 "9시간"정도 밖에 안되고, 기초 알고리즘부터 심화 알고리즘까지 잘 정리되어 있어 수강신청을 했습니다. [HD]쉽게 배우는 C# 알고리즘 프로그래밍 Part.1 알고리즘(Algorithm)과 절차 지향 프로그래밍 강의 소개 학습할 알고리즘 리스트 및 강의 소스 다운로드 등 소개 참고_알고리즘 학습 환경 구축_닷넷 개발자를 위한 Visual Studio 설치 합계 알고리즘(Sum Algorithm) 디버거를 사용하여 ..
[백준 11653번 c#] 소인수분해 구하기
·
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() { //정수 N 소인수분해하기 int N = int.Parse(Console.ReadLine()); for(int i=2; i
[백준 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을 통해 큰 수를 사..
[유니티] 기본 개념 알기
·
대외활동/starters 부트캠프 feat.웅진씽크빅
인스펙터 창에서 오브젝트 배열 한번에 넣기 -> 오른쪽 위 잠금을 통해 hierarchy창 게임 오브젝트들을 한번에 넣기 SerializeField -> private 변수이지만, 인스펙터 창에서 접근가능하게 해줌 activeInHierarchy 와 activeSelf 는 bool 값을 반환
[백준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..