← Back to List

16673번: 고려대학교에는 공식 와인이 있다 ↗

Solutions

C++14
131 B | 131 chars
#include <iostream>
using namespace std;
long long C,K,P;
int main()
{
	cin>>C>>K>>P;
	cout<<(C*(C+1)/2)*K+(C*(C+1)*(2*C+1)/6)*P;
}