Algorithm/Implementation (750) 썸네일형 리스트형 (C++) - 백준(BOJ) 20353 : Atrium https://www.acmicpc.net/problem/20353 20353번: Atrium The atrium of a traditional Roman dormus, much like the atria of today, is a perfectly square room designed for residents and guests to congregate in and to enjoy the sunlight streaming in from above. Or, in the case of Britannia, the rain streaming in fro www.acmicpc.net sqrt함수를 사용해보는 문제였습니다. 📕 풀이방법 📔 입력 및 초기화 공연장의 넓이 area를 선언 후 입력받습니다. 📔 풀이과.. (C++) - 백준(BOJ) 20232 : Archivist https://www.acmicpc.net/problem/20232 20232번: Archivist The only line of input contains a single integer y (1995≤y≤2019), denoting the year. You don't need to process year numbers less than 1995 or greater than 2019, or incorrect year formats. It is guaranteed that you will be given a number bet www.acmicpc.net 함수를 사용하는 문제였습니다. 📕 풀이방법 📔 입력 및 초기화 연도를 입력받을 변수 year를 선언 후 입력받습니다. 📔 풀.. (C++) - 백준(BOJ) 20233 : Bicycle https://www.acmicpc.net/problem/20233 20233번: Bicycle The first four lines of the input contain integers a, x, b, and y (0≤a,x,b,y≤100), each on a separate line. The last line contains a single integer T (1≤T≤1440) --- the total time spent on a bicycle during each day. www.acmicpc.net if문을 사용해보는 문제였습니다. 📕 풀이방법 📔 입력 및 초기화 a, x, b, y, T, option1, option2 를 선언 후.. (C++) - 백준(BOJ) 20352 : Circus https://www.acmicpc.net/problem/20352 20352번: Circus In the modern world, the spotlight has shifted entirely from live shows to televised recordings. Well, not entirely... One small troupe of indomitable entertainers still holds out and puts on regular circus performances. The shows are extremely popular. www.acmicpc.net 간단한 산수 문제였습니다. 📕 풀이방법 📔 입력 및 초기화 원으로 생긴 circus tent의 넓이 tentArea를 선언 후 입력받습.. (C++) - 백준(BOJ) 20215 : Cutting Corners https://www.acmicpc.net/problem/20215 20215번: Cutting Corners A large coffee spill in the warehouse of the Busy Association of Papercutters on Caffeine has stained the corners of all paper in storage. In order to not waste money, it was decided that these dirty corners should be cut off of all pieces of paper. A few www.acmicpc.net 간단한 수식문제였습니다. 📕 풀이방법 📔 입력 및 초기화 너비 w, 높이 h, 직사각형으로 잘랐을 때의 자른 길이 .. (C++) - 백준(BOJ) 19602 : Dog Treats https://www.acmicpc.net/problem/19602 19602번: Dog Treats There are three lines of input. Each line contains a non-negative integer less than 10. The first line contains the number of small treats, S, the second line contains the number of medium treats, M, and the third line contains the number of large treats, www.acmicpc.net 입출력, if else문을 사용해보는 문제였습니다. 📕 풀이방법 📔 입력 및 초기화 s, m, l, 점수 score를 선언 .. (C++) - 백준(BOJ) 18414 : X に最も近い値 (The Nearest Value) https://www.acmicpc.net/problem/18414 18414번: X に最も近い値 (The Nearest Value) 整数 X, L, R が与えられる. L 以上 R 以下の整数のうち,X との差の絶対値が最も小さいものを出力せよ.そのような整数はちょうど 1 つだけ存在することが証明できる. www.acmicpc.net 표준입출력, for, if문을 사용해보는 문제였습니다. 📕 풀이방법 📔 입력 및 초기화 x, l, r, 최소 차이를 저장할 minDiff, 최소 차이를 가졌을 때 값을 출력할 ans를 선언 후 x, l, r을 입력해줍니다. 📔 풀이과정 1. i = l ~ r범위까지 for문을 돕니다. 2. 절댓값의 차이 minDiff보다 작은 값이 존재한다면 해당 차이를 저장해주고 그 때의 수 i를 a.. (C++) - 백준(BOJ) 18408 : 3 つの整数 (Three Integers) https://www.acmicpc.net/problem/18408 18408번: 3 つの整数 (Three Integers) 3 つの整数 A, B, C が与えられる.A, B, C はそれぞれ 1 または 2 である.1 と 2 のうち,どちらが多くあるか. www.acmicpc.net for문과 max함수를 사용해보는 문제였습니다. 📕 풀이방법 📔 입력 및 초기화 3개의 정수의 빈도수를 세줄 일차원 배열 a, 최다 빈도수를 비교할 변수 cnt를 선언 후 3개의 정수를 입력 후 a에 빈도수를 세주어 저장합니다. 📔 풀이과정 1. for문을 돌며 가장 많이 나온 빈도수를 cnt에 저장합니다. 2. for문을 돌며 cnt와 같은 값이 나온다면 index를 출력하고 break;해줍니다. 📕 Code #include us.. 이전 1 ··· 70 71 72 73 74 75 76 ··· 94 다음 목록 더보기