답안 #3770

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
3770 2013-08-31T08:15:23 Z pl0892029 Great Pow! (kriii1_G) C++
컴파일 오류
0 ms 0 KB
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>

int main(void){
	int a, k;
	scanf("%d %d", &a, &k);

	__int64 res = a;
	for(int i=0; i<k+1; i++){
		res=pow((double)res, a);
	}
	printf("%d", res%(a+1));
	

}

Compilation message

G.cpp: In function 'int main()':
G.cpp:10:2: error: '__int64' was not declared in this scope
G.cpp:10:10: error: expected ';' before 'res'
G.cpp:12:3: error: 'res' was not declared in this scope
G.cpp:14:15: error: 'res' was not declared in this scope
G.cpp:8:24: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]