본문 바로가기

전체 글468

[BOJ / C++] 1748번 : 수 이어 쓰기 1 문제 1부터 N까지의 수를 이어서 쓰면 다음과 같이 새로운 하나의 수를 얻을 수 있다. 1234567891011121314151617181920212223... 이렇게 만들어진 새로운 수는 몇 자리 수일까? 이 수의 자릿수를 구하는 프로그램을 작성하시오. 입력 첫째 줄에 N(1 ≤ N ≤ 100,000,000)이 주어진다. 출력 첫째 줄에 새로운 수의 자릿수를 출력한다. Solved.ac 레벨 실버 IV 풀이 #include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n; int cnt = 0; cin >> n; if(n < 10){ cout 2023. 1. 3.
[BOJ / C++] 24736번 : Football Scoring 문제 There are five ways to score points in american professional football: Touchdown - 6 points Field Goal - 3 points Safety - 2 points After touchdown 1 point (Field Goal or Safety) - Typically called the “Point after” 2 points (touchdown) - Typically called the “Two-point conversion” (https://operations.nfl.com/the-rules/nfl-video-rulebook/scoring-plays/) Given the box score values for two comp.. 2023. 1. 3.
[BOJ / Python] 16099번 : Larger Sport Facility 문제 In a lot of places in the world, elite universities come in pairs and their students like to challenge each other every year. In England, Oxford and Cambridge are famous for The Boat Race, an annual rowing race that opposes them. In Switzerland, students from Zürich and Lausanne battle in a famous annual ski challenge. TelecomParisTech and Eurecom, two famous French schools, are also planning.. 2023. 1. 3.
[BOJ / C++] 1476번 : 날짜 계산 문제 준규가 사는 나라는 우리가 사용하는 연도와 다른 방식을 이용한다. 준규가 사는 나라에서는 수 3개를 이용해서 연도를 나타낸다. 각각의 수는 지구, 태양, 그리고 달을 나타낸다. 지구를 나타내는 수를 E, 태양을 나타내는 수를 S, 달을 나타내는 수를 M이라고 했을 때, 이 세 수는 서로 다른 범위를 가진다. (1 ≤ E ≤ 15, 1 ≤ S ≤ 28, 1 ≤ M ≤ 19) 우리가 알고있는 1년은 준규가 살고있는 나라에서는 1 1 1로 나타낼 수 있다. 1년이 지날 때마다, 세 수는 모두 1씩 증가한다. 만약, 어떤 수가 범위를 넘어가는 경우에는 1이 된다. 예를 들어, 15년은 15 15 15로 나타낼 수 있다. 하지만, 1년이 지나서 16년이 되면 16 16 16이 아니라 1 16 16이 된다. .. 2022. 12. 28.