Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
546 B
2
Indexable
Never
#include <iostream>
using namespace std;
#include<bits/stdc++.h>



int main(){
    int testcases;
    cin>>testcases;



    while(testcases!=0){

        int covid = 1;
        int day, population;
        cin>>population>>day;


        for(int i =1;i<=day;i++){

            if(covid>=population) {covid = population; break;}
            if(i<=10){
                covid *=2;
            }
            else covid *=3;

        }

        cout<<covid<<endl;

        testcases--;

    }
    
    return 0;
}