본문 바로가기

반응형

Algorithm Problem/AtCoder

(3)
Candy Tribulation Problem: https://atcoder.jp/contests/abc432/tasks/abc432_c C - Candy TribulationAtCoder is a programming contest site for anyone from beginners to experts. We hold weekly programming contests online.atcoder.jp 문제 요약작은 사탕과, 큰 사탕 두 종류의 사탕이 있다.작은 사탕의 한 개 무게는 X, 큰 사탕의 한 개 무게는 Y일 때,N명에게 동일한 무게의 사탕을 분배하려고 한다. N명이 받은 큰 사탕은 몇 개인가?단, 각각 받을 수 있는 최대 사탕 갯수는 모두 다르다. 예시1)입력설명(의미)3 6 83명, X = 6, Y = 811 10 13각..
Truck Driver Problem: https://atcoder.jp/contests/abc430/tasks/abc430_c C - Truck DriverAtCoder is a programming contest site for anyone from beginners to experts. We hold weekly programming contests online.atcoder.jp 문제 요약'a' 와 'b'로만 이루어진 문자열S가 주어진다. (e.g. abbaaabaaba)문자열 S에서, 'a'가 A개 이상이고, 'b'가 B미만인 부분 문자열의 갯수를 구하여라. 예시1)SabbaaabaabaA4B2정답: 3부문 문자열1 (4, 8): aaaba부분 문자열2 (4, 9): aaabaa부분 문자열3 (5, 9): aabaa..
Security 2 Problem: https://atcoder.jp/contests/abc407/tasks/abc407_c C - Security 2AtCoder is a programming contest site for anyone from beginners to experts. We hold weekly programming contests online.atcoder.jp 문제 요약특별한 기능을 가진 버튼 A, B가 있다.입력된 값(input)을 만들기 위해서는, A,B 버튼을 최소 몇 번 사용해야 하는가? 초기값: 빈 문자열(S)버튼A: S에 0을 더한다버튼B: S의 모든 문자에 1을 더한다 예시)S: 1984버튼A: 19840버튼B: 20951 모든 문자는 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9)로..

반응형