fragment-header
fragment-markdown
홈
로그인
로그아웃
내 블로그
설정
로그인
백준 34380 (C++) Blaster's Dash
최초 업로드: 2025-10-26 17:55:21
최근 수정 시간: 2025-10-26 17:57:23
게시자: rlatjwls3333
카테고리: 백준
조회수: 14
# [Bronze IV] Blaster's Dash [문제 링크](https://www.acmicpc.net/problem/34380) ## 문제 설명 <p>After every touchdown that Mines scores at a football game, the Mines mascot Blaster the Burrow runs out on the field to the $n^{th}$ yard line, and back, escorted by members of the Blue Key honor society who also carry the Mines flag. Because Mines scores so many touchdowns, Blaster gets tired and runs at most to the $50^{th}$ yard line (midfield).</p> <p>To run to the $n^{th}$ yard line, Blaster runs $10$ yards from the fence to the back of the endzone, then runs $10$ yards through the endzone, and finally runs $n$ yards to reach the $n^{th}$ yard line. To complete his trip on the field, Blaster then runs straight back to the fence. Given that Blaster ran to the $n^{th}$ yard line after one particular touchdown scored by Mines, how far did he run in total?</p> ## 입력 <p>The first line of input contains two space-separated integers representing the score of the game. The score for the Colorado School of Mines football team, $M$, is first, followed by the score for their opponent, $V$. You are guaranteed that the score for Mines is greater than the score for their opponent ($M > V$).</p> <p>The next line of input contains a single integer, $1 \leq n \leq 50$, representing the yard line that Blaster ran to.</p> <p>The last line of input contains a single integer representing, $K$, the current temperature in Kelvin.</p> ## 출력 <p>Output a single line containing the total number of yards that Blaster ran after this particular touchdown.</p> ## 풀이 (20+n) * 2를 출력하는 문제입니다. 점수나 온도는 무시해도 됩니다. ``` c++ #include<bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); int m, v, n; cin >> m >> v >> n; cout << 2*n+40; } ```