목록BOJ (345)
코딩로그

[문제] Given two integers, calculate and output their sum. [입력] The input contains several test cases. The first line contains and integer t (t ≤ 100) denoting the number of test cases. Then t tests follow, each of them consisiting of two space separated integers x and y (−10^9 ≤ x, y ≤ 10^9). [출력] For each test case output output the sum of the corresponding integers. [Source Code] #include #incl..

[문제] 2018 SCAL-MOOKJA에 출전하기로 한 무근이와 인서는 대회 준비를 위해 같이 모여 문제를 풀기로 했다. 그런데 어느 날, 일어나서 날짜를 확인해 보니 무근이와 인서의 시계가 서로 다른 날짜를 가리키고 있었다. 두 사람이 정확한 날짜에 모일 수 있도록 문제를 푸는 지금 시각이 UTC+0(세계 표준시)을 기준으로 무슨 날짜인지 출력해 주는 프로그램을 작성하자. 만약 서울에서 확인한 시각이 2018년 9월 29일 오후 2시 정각이라면 UTC+0 기준의 시각은 2018년 9월 29일 오전 5시 정각이다. Fri Sep 29 05:00:00 UTC 2018 [입력] 이 문제는 입력이 없다. [출력] 지금 시각을 UTC+0(세계 표준시)을 기준으로 나타냈을 때의 연도, 월, 일을 한 줄에 하나씩 ..

[문제] In the United States of America, telephone numbers within an area code consist of 7 digits: the prefix number is the first 3 digits and the line number is the last 4 digits. Traditionally, the 555 prefix number has been used to provide directory information and assistance as in the following examples: 555-1212 555-9876 555-5000 555-7777 Telephone company switching hardware would detect the ..

[문제] 2와 e는 발음이 비슷해, 둘을 섞어서 말하면 듣는 사람을 짜증나게 만들 수 있다. 지민이는 이 점을 이용해 은수를 미치게 하고 있다. 은수를 위해 지민이가 말한 문자열 s가 주어질때, 2의 등장 횟수가 더 많은지, e의 등장 횟수가 더 많은지 도와주자. [입력] 첫 줄에 문자열 s의 길이가 주어진다. 둘째 줄에 문자열 s가 주어진다. s의 길이는 1 이상 105 이하이며, s는 2와 e로만 이루어져 있다. [출력] 2의 등장횟수가 더 많다면 2를 출력하고, e의 등장횟수가 더 많다면 e를 출력한다. 등장횟수가 같다면 "yee"를 출력한다. (큰 따옴표 제외) [Source Code] #include #include #include #include #include using namespace s..

[문제] You and your friend have come up with a way to send messages back and forth. Your friend can encode a message to you by writing down a positive integer N and a symbol. You can decode that message by writing out that symbol N times in a row on one line. Given a message that your friend has encoded, decode it. [입력] The first line of input contains L, the number of lines in the message. The ne..

[문제] 그가 「진짜」이면 gosu, 「가짜」이면 hasu를 출력한다. [입력] $K/D/A$가 주어진다. [출력] 그가 「진짜」이면 gosu, 「가짜」이면 hasu를 출력한다. [제한] $0 \le K, D, A \le 20$ [Source Code] #include #include #include #include #include using namespace std; int main() { int k = 0, d = 0, a = 0; char temp; cin >> k >> temp >> d >> temp >> a; if(k + a < d || d == 0) cout
[문제] A solid competitive programming team can rack up a lot of prize money. Knowing how strong your team is, you are certain to win a lot of contests, so you had better sit down now and check that everybody will receive the same fair distribution of winnings. You will participate in multiple contests, and at the end of each one receive a set amount of prize money. You can distribute any amount t..

[문제] 당신은 싸이컴을 향해 절을 하려고 합니다. 하지만, 당신이 싸이컴에 들어오고 싶어서 절을 한 번 할 수도 있고, 싸이컴을 매우 싫어해 절을 두 번 할 수도 있습니다. 당신이 절을 할 횟수가 주어질 때, 그 횟수만큼 절하는 프로그램을 작성하세요. 실제로 프로그램을 이용해 절을 할 수는 없기 때문에, 대신 “SciComLove”를 출력하도록 합니다. [입력] 첫 줄에 정수 $N$이 주어집니다. [출력] "SciComLove"를 예제와 같이 $N$번 출력합니다. 단, 따옴표는 출력하지 않습니다. [제한] $1 \le N \le 2$ [Source Code] #include #include #include #include #include using namespace std; int main() { in..