Created
September 7, 2018 08:58
-
-
Save keehyun2/62ab2b87b026d35ed82c26f6e877c5d3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
#include <algorithm> | |
#include <numeric> | |
#include <math.h> | |
using namespace std; | |
int main() { | |
int a[7] = {0,500,300,200,50,30,10}; | |
vector<int> arr; | |
arr.push_back(0); | |
for (size_t i = 1; i < 101; i++) | |
{ | |
if(i>6) { | |
arr.push_back(0); | |
continue; | |
} | |
for (size_t j = 0; j < i; j++) | |
{ | |
arr.push_back(a[i]); | |
} | |
} | |
int b[6] = {0,512,256,128,64,32}; | |
vector<int> arr2; | |
arr2.push_back(0); | |
for (size_t i = 1; i < 65; i++) | |
{ | |
if(i>5) { | |
arr2.push_back(0); | |
continue; | |
} | |
for (size_t j = 0; j < pow(2,i-1); j++) | |
{ | |
arr2.push_back(b[i]); | |
} | |
} | |
int T; // 입력되는 숫자 갯수 | |
int input1, input2; | |
vector<int> solve; | |
cin >> T; | |
while (T--) | |
{ | |
cin >> input1; | |
cin >> input2; | |
solve.push_back(arr[input1] + arr2[input2]); | |
} | |
for(auto const& value: solve) | |
{ | |
cout << value * 10000 << endl; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment