Algorithm Trainning38 백준 : 21147번, Triangular Collection 문제 주소 : https://www.acmicpc.net/problem/21147 정답 비율 : 68.75% (2022.01.06 10:40 기준) 21147번: Triangular Collection Call a set of positive integers triangular if it has size at least three and, for all triples of distinct integers from the set, a triangle with those three integers as side lengths can be constructed. Given a set of positive integers, compute the number o www.acmicpc.net > 1. N개의 양의 .. 2022. 1. 6. 백준 : 6494번, Another lottery 문제 주소 : https://www.acmicpc.net/problem/6494 정답 비율 : 68.421% (2021.12.19 22:16 기준) 6494번: Another lottery For each test case, print n lines of output, where line i contains the probability as a reduced fraction that participant i wins the most money. See the sample output for details. www.acmicpc.net > 1. n명이 각각 1 ~ m 회차 m개의 로또를 구매합니다. 2. 각 회차의 당첨자는 해당 회차에서 판매된 모든 티켓을 동일한 확률로 무작위로 하나를 선택하여 해당 티켓.. 2021. 12. 20. 백준 : 4571번, Grade School Multiplication 문제 주소 : https://www.acmicpc.net/problem/4571 정답 비율 : 85.714% (2021.12.19 15:20 기준) 4571번: Grade School Multiplication An educational software company, All Computer Math (ACM), has a section on multiplication of integers. They want to display the calculations in the traditional grade school format, like the following computation of 432 × 5678: 432 5678 --- www.acmicpc.net > 두 수가 주어질 때, 두 수의 곱셈 과정.. 2021. 12. 19. 백준 : 10757번, 큰 수 A+B 문제 주소 : https://www.acmicpc.net/problem/10757 정답 비율 : 48.601% (2021.07.26 23:22 기준) 10757번: 큰 수 A+B 두 정수 A와 B를 입력받은 다음, A+B를 출력하는 프로그램을 작성하시오. www.acmicpc.net 문제 풀이 : 약간의 고전 문제(?)입니다. C언어에서는 숫자로 입력 받을 수 없는 수가 주어집니다. 따라서 해당 숫자를 문자열로 입력받은 후에 직접 더하기를 구현해야 합니다. 코드는 다음과 같습니다. C99 #include #include #define MAX 10001 char a[MAX]; char b[MAX]; char s[MAX + 1]; int main(void) { scanf("%s %s", a, b); int .. 2021. 7. 26. 이전 1 2 3 4 ··· 10 다음