본문 바로가기
백준 문제 해설

백준 24736 Football Scoring

by toomanysegtrees 2022. 10. 22.

10/20일의 블로그이다

https://www.acmicpc.net/problem/24736

 

24736번: Football Scoring

There are two lines of input each containing five space-separated non-negative integers, T, F, S, P and C representing the number of Touchdowns, Field goals, Safeties, Points-after-touchdown and two-point Conversions after touchdown respectively. (0 ≤ T

www.acmicpc.net

풀이

입력으로 주어지는 수에 대해 가해야하는 가중치가 있다 이 weighted sum을 구하여 출력을 하면 된다. 이를 두번 해준다.

시간 복잡도 : $O(1)$

소요 시간 : 5초

아쉬운 점 : 통합과학 공부 열심히 하자

전체적인 감상 : 내일 시험은 통합과학이다(반영비율 4%)

/* basic setup {{{ */
#include<bits/stdc++.h>
#define ff first
#define ss second
#define pb push_back
#define sz(x) ((int)x.size())
#define all(x) x.begin(),x.end()
#define compress(x) sort(all(x)), x.erase(unique(all(x)), x.end())
#define fast_io ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef const int ci;
const int MOD = 1e9+7;
const int INF = 0x3f3f3f3f;
const ll LINF = 0x3f3f3f3f3f3f3f3f;
/*}}}*/

int main(){
	fast_io;
	int a, b, c, d, e;
	cin>>a>>b>>c>>d>>e;
	cout<<a*6+b*3+c*2+d+e*2<<' ';
	cin>>a>>b>>c>>d>>e;
	cout<<a*6+b*3+c*2+d+e*2<<' ';
}

'백준 문제 해설' 카테고리의 다른 글

백준 15458 Barn Painting  (0) 2022.10.24
백준 15457 A Pie for a Pie  (0) 2022.10.23
백준 9659 돌 게임 5  (0) 2022.10.22
백준 3733 Shares  (0) 2022.10.22
백준 25311 UCPC에서 가장 쉬운 문제번호는?  (0) 2022.10.22
백준 25372 성택이의 은밀한 비밀번호  (0) 2022.10.22
백준 25238 가희와 방어율 무시  (0) 2022.10.22
백준 25377 빵  (0) 2022.10.22