제출 #854027

#제출 시각아이디문제언어결과실행 시간메모리
854027LoboWeird Numeral System (CCO21_day1problem2)C++17
컴파일 에러
0 ms0 KiB
int i = 0;
        while((i == 0 || dp[i].count(0) == 0) && dp[i].size() != 0) {
            for(auto X : dp[i]) {
                int nn = X.fr;
                for(auto x : a) {
                    if((x%k+k)%k == (nn%k+k)%k) {
                        dp[i+1][(nn-x)/k] = x;
                    }
                }
            }
            i++;
        }

컴파일 시 표준 에러 (stderr) 메시지

Main.cpp:2:9: error: expected unqualified-id before 'while'
    2 |         while((i == 0 || dp[i].count(0) == 0) && dp[i].size() != 0) {
      |         ^~~~~