제출 #929498

#제출 시각아이디문제언어결과실행 시간메모리
929498ChinguunRack (eJOI19_rack)C++14
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; #define int long long #define ff first #define ss second #define pb push_back #define meta int x = i * 2 + 1, y = x + 1, m = (L + R) / 2 const int N = 2e5 + 7; const int oo = 1e18; const int mod = 1e9 + 7; typedef pair<int, int> pii; typedef vector<int> vi; typedef vector<pii> vii; int query(int ans, int k) { if(k % 2 == 1) ans *= 2; else { ans *= 2; ans++; } return ans; } signed main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n, k; cin >> n >> k; cout << query(pw(2, n), k) << '\n'; return 0; }

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

rack.cpp: In function 'int main()':
rack.cpp:32:16: error: 'pw' was not declared in this scope; did you mean 'pow'?
   32 |  cout << query(pw(2, n), k) << '\n';
      |                ^~
      |                pow