답안 #237589

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
237589 2020-06-07T15:08:29 Z tb_03 Rack (eJOI19_rack) C++14
컴파일 오류
0 ms 0 KB
#include <iostream>
 
using namespace std;
typedef unsigned long long ll;
 
	const ll modulo = 1000000007;
	int n, k;
	ll ans = 1;
 
	void recursiva(int level, int casacos)
	{
		if (level == 0)
			return;
 
		if (casacos % 2 == 0)
			recursiva(level - 1, casacos / 2);
		else
		{
			ans = (((ll)powl(2, (level - 1)) % modulo) + ans) % modulo;
			recursiva(level - 1, (casacos - 1) / 2);
		}
	}
 
	int main()
	{
		cin >> n >> k;
		recursiva(n, k - 1);
		cout << ans << endl;
		return 0;
	}

Compilation message

rack.cpp: In function 'void recursiva(int, int)':
rack.cpp:19:16: error: 'powl' was not declared in this scope
    ans = (((ll)powl(2, (level - 1)) % modulo) + ans) % modulo;
                ^~~~
rack.cpp:19:16: note: suggested alternative: 'bool'
    ans = (((ll)powl(2, (level - 1)) % modulo) + ans) % modulo;
                ^~~~
                bool