TopCoder

[TopCoder] DiamondLogo

문제 원문 https://arena.topcoder.com/#/u/practiceCode/1344/1782/1910/1/1344     2.  문제 요약 문제는 전통적인 별찍기와 비슷한 문제이다. 대각선의 길이가 주어지면, 대각선을 길이를 기준으로 X를 찍고 안쪽은 공백을, 나머지는 주어진 문자열을 찍는 문제이다.   문제 해결 방법 먼저 라인의 수를 계산한다. 라인의 수는 대각선의 길이를 기준으로 계산한다. (대각선의길이-1) * 2 + 1 이면 라인의 수, 즉 행과 열의 길이가 나온다. …

[TopCoder] DiamondLogo 더 보기 »

[Topcoder] The Almost Lucky Numbers Div Two

문제 원문. Problem Statement John and Brus believe that the digits 4 and 7 are lucky and all others are not. According to them, an almost lucky number is a number that contains at most one non-lucky digit in its decimal representation. Return the total number of almost lucky numbers between a and b, inclusive. Definition Class: TheAlmostLuckyNumbersDivTwo …

[Topcoder] The Almost Lucky Numbers Div Two 더 보기 »