Computer Science/Coding Test 5

[HackerRank] The Minion Game

https://www.hackerrank.com/challenges/the-minion-game The Minion Game | HackerRankGiven a string, judge the winner of the minion game.www.hackerrank.com [문제 ]Kevin and Stuart want to play the 'The Minion Game'.케빈과 스튜어트는 '미니언 게임'을 하고 싶어 합니다.Game RulesBoth players are given the same string, S.Both players have to make substrings using the letters of the string S.Stuart has to make words starting w..

[HackerRank]Repeated String

[문제 ]There is a string, s, of lowercase English letters that is repeated infinitely many times. Given an integer, n, find and print the number of letter a's in the first letters of the infinite string.문자열 s가 있고, 소문자 영문으로 여러 번 무한으로 반복된다. 주어진 정수 n이 있고, 무한의 문자열에서 첫 글자에 있는 'a'의 개수를 구해 출력하시오.Examples = 'abcac'n = 10The substring we consider is abcacabcac, the first 10 characters of the infinite stri..

[HackerRank] Sales by Match

https://www.hackerrank.com/challenges/sock-merchant/problem Sales by Match | HackerRankHow many pairs of socks can Alex sell?www.hackerrank.com[문제 ]There is a large pile of socks that must be paired by color. Given an array of integers representing the color of each sock, determine how many pairs of socks with matching colors there are.당신에게는 다양한 색상의 양말이 무작위로 섞인 큰 양말 더미가 있습니다.각 양말의 색상은 정수로 표시되며, ..