diff --git "a/11\354\233\22416\354\235\274/\354\264\210\354\244\221\352\270\211/1116_2246.cpp" "b/11\354\233\22416\354\235\274/\354\264\210\354\244\221\352\270\211/1116_2246.cpp" new file mode 100644 index 0000000..70f5316 --- /dev/null +++ "b/11\354\233\22416\354\235\274/\354\264\210\354\244\221\352\270\211/1116_2246.cpp" @@ -0,0 +1,36 @@ +#include +#include +#include + +using namespace std; + +int solution(int n, vector> &condo_loc, vector> &condo_cost){ + int cnt=0; + + for(int i=0; i> n; + vector> condo_loc; //거리 + vector> condo_cost; //가격 + for(int i=0 ; i> condo_loc[i].first>> condo_cost[i].first; + } + + sort(condo_loc.begin(), condo_loc.end()); + sort(condo_cost.begin(), condo_cost.end()); + cout << solution(n , condo_loc, condo_cost); + + return 0; +} \ No newline at end of file diff --git "a/11\354\233\22416\354\235\274/\354\264\210\354\244\221\352\270\211/1116_4436.cpp" "b/11\354\233\22416\354\235\274/\354\264\210\354\244\221\352\270\211/1116_4436.cpp" new file mode 100644 index 0000000..b92a64b --- /dev/null +++ "b/11\354\233\22416\354\235\274/\354\264\210\354\244\221\352\270\211/1116_4436.cpp" @@ -0,0 +1,34 @@ +#include +#include + +using namespace std; + +int solution(int n){ + vector num(10,1); + int k=1; + long long arr=0; + while(true){ + arr += n; + long long temp = arr; + while(temp != 0){ + long long temp2 = arr%10; + if(num[temp2]==1) num.erase(num.begin()+temp2); + temp /= 10; + } + if(num.empty()) break; + k++; + } + return k; +} + +int main(){ + + while(true){ + int n; + cin >> n; + if (cin.eof()) break; + cout << solution(n)<<'\n'; + } + + return 0; +} \ No newline at end of file