짬뽕얼큰하게의 맨땅에 헤딩 :: '2025/04/12 글 목록

'2025/04/12'에 해당되는 글 1건

pre> code> }; } return ans; } ans += ret; long long ret = getCnt(cnt, n); } cnt[c-'0']++; for(char c : vals){ int cnt[10] = {0}; for(auto vals : s){ long long ans = 0; makePalindrome(n, k, 0, 0); long long countGoodIntegers(int n, int k) { } return ret; } n -= cnt[i]; } ret *= combi(n, cnt[i]); } else{ ret *= combi(n-1, cnt[i]); if(i == 0){ if(cnt[i] == 0) continue; for(int i = 0 ; i < 10; i++){ long long ret = 1; long long getCnt(int cnt[10], int n){ } return ret; }<= i; ret code> for(int i = 1; i <= r; i++){ } n--; rr--; ret *= n; while(rr){ int rr = r; long long ret = 1; long long combi(int n, int r){ } } makePalindrome(n, k, curNum*10 + i, depth + 1); if(depth == 0 && i == 0) continue; for(int i = 0; i <= 9; i++){ } return; } push(curNum); if((curNum%k) == 0){ }<= 10; tmp code> curNum += tmp %10; curNum *= 10; while(tmp){ }<= 10; tmp code> if((n%2) == 1){ long long tmp = curNum;<2){ if(depth == (n+1)code> void makePalindrome(int n, int k, long long curNum, int depth){ } s.insert(str); } str += to_string(tmp[i]); for(int i = 0 ; i < tmp.size(); i++){ string str = ""; sort(tmp.begin(), tmp.end(), [](long long a, long long b) -> long long {return a > b; }); }<= 10; nn code> tmp.push_back(nn%10); while(nn){ long long nn = n; vector tmp; void push(long long n){ set s; public:


class Solution {

'알고리즘' 카테고리의 다른 글

Count Good Triplets  (0) 2025.04.14
Count Good Numbers  (0) 2025.04.13
Count Symmetric Integers  (0) 2025.04.11
Count the Number of Powerful Integers  (0) 2025.04.11
Minimum Operations to Make Array Values Equal to K  (0) 2025.04.10
블로그 이미지

짬뽕얼큰하게

,