Skip to content

Commit cc79975

Browse files
committed
[Bronze V] Title: 대전과학고등학교를 사랑하십니까?, Time: 0 ms, Memory: 2024 KB -BaekjoonHub
1 parent 37f1a05 commit cc79975

2 files changed

Lines changed: 71 additions & 0 deletions

File tree

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# [Bronze V] 대전과학고등학교를 사랑하십니까? - 34691
2+
3+
[문제 링크](https://www.acmicpc.net/problem/34691)
4+
5+
### 성능 요약
6+
7+
메모리: 2024 KB, 시간: 0 ms
8+
9+
### 분류
10+
11+
구현
12+
13+
### 제출 일자
14+
15+
2026년 4월 6일 23:54:31
16+
17+
### 문제 설명
18+
19+
<p>DSHStack의 참가자라면, 학교를 사랑하는 마음은 아는 것에서부터 시작되지 않을까요?</p>
20+
21+
<p>학교의 상징을 물어보는 질문이 주어졌을 때, 해당 상징의 <strong>학명</strong>을 정답으로 출력해 보자.</p>
22+
23+
<ol>
24+
<li>질문 <span style="color:#e74c3c;"><code>animal</code></span>의 정답은 학교의 상징 동물인 호랑이이다.
25+
26+
<ul>
27+
<li>호랑이의 학명은 <em>Panthera tigris</em> 이다.</li>
28+
</ul>
29+
</li>
30+
<li>질문 <span style="color:#e74c3c;"><code>tree</code></span>의 정답은 학교의 상징 나무인 소나무이다.
31+
<ul>
32+
<li>소나무의 학명은 <em>Pinus densiflora</em> 이다.</li>
33+
</ul>
34+
</li>
35+
<li>질문 <span style="color:#e74c3c;"><code>flower</code></span>의 정답은 학교의 상징 꽃인 개나리이다.
36+
<ul>
37+
<li>개나리의 학명은 <em>Forsythia koreana</em> 이다.</li>
38+
</ul>
39+
</li>
40+
</ol>
41+
42+
### 입력
43+
44+
<p>첫째 줄부터 한 줄에 하나씩 문자열이 주어진다.</p>
45+
46+
<p>입력되는 문자열은 <span style="color:#e74c3c;"><code>animal</code></span>, <span style="color:#e74c3c;"><code>tree</code></span>, <span style="color:#e74c3c;"><code>flower</code></span>, <span style="color:#e74c3c;"><code>end</code></span> 중 하나이며, <span style="color:#e74c3c;"><code>end</code></span>는 입력의 마지막 줄에만 항상 주어진다. <span style="color:#e74c3c;"><code>end</code></span>는 질문이 아니며, 처리하지 않는다.</p>
47+
48+
<p>질문은 <mjx-container class="MathJax" jax="CHTML" style="font-size: 109%; position: relative;"><mjx-math class="MJX-TEX" aria-hidden="true"><mjx-mn class="mjx-n"><mjx-c class="mjx-c31"></mjx-c></mjx-mn></mjx-math><mjx-assistive-mml unselectable="on" display="inline"><math xmlns="http://www.w3.org/1998/Math/MathML"><mn>1</mn></math></mjx-assistive-mml><span aria-hidden="true" class="no-mathjax mjx-copytext">$1$</span></mjx-container>회 이상 주어지며, <mjx-container class="MathJax" jax="CHTML" style="font-size: 109%; position: relative;"><mjx-math class="MJX-TEX" aria-hidden="true"><mjx-mn class="mjx-n"><mjx-c class="mjx-c31"></mjx-c></mjx-mn><mjx-mstyle><mjx-mspace style="width: 0.167em;"></mjx-mspace></mjx-mstyle><mjx-mn class="mjx-n"><mjx-c class="mjx-c30"></mjx-c><mjx-c class="mjx-c30"></mjx-c><mjx-c class="mjx-c30"></mjx-c></mjx-mn></mjx-math><mjx-assistive-mml unselectable="on" display="inline"><math xmlns="http://www.w3.org/1998/Math/MathML"><mn>1</mn><mstyle scriptlevel="0"><mspace width="0.167em"></mspace></mstyle><mn>000</mn></math></mjx-assistive-mml><span aria-hidden="true" class="no-mathjax mjx-copytext">$1\,000$</span></mjx-container>회 이상 주어지지 않는다.</p>
49+
50+
### 출력
51+
52+
<p>입력된 각 질문에 해당하는 상징의 <strong>학명</strong>을 한 줄에 하나씩 출력한다.</p>
53+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#include <iostream>
2+
using namespace std;
3+
4+
int main()
5+
{
6+
ios::sync_with_stdio( 0 );
7+
cin.tie( 0 );
8+
cout.tie( 0 );
9+
10+
string s;
11+
while ( cin >> s )
12+
{
13+
if ( s == "end" )
14+
break;
15+
16+
cout << ( s == "animal" ? "Panthera tigris" : s == "flower" ? "Forsythia koreana" : "Pinus densiflora" ) << '\n';
17+
}
18+
}

0 commit comments

Comments
 (0)