답안 #19530

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
19530 2016-02-24T16:18:43 Z jihoon Α (kriii4_P1) C++
컴파일 오류
0 ms 0 KB
#include<cstdio>
long long a,x,ans,gop;
int main(){
  
  scanf("%lld\n%lld",&a,&x);
  gop=x; ans=1;
  while(x){
    if(x&1){ans*=gop;ans%=je;}
    x >>= 1;gop*=gop;gop%=je;
  }
  printf("%lld",ans);
}

Compilation message

P1.cpp: In function ‘int main()’:
P1.cpp:8:27: error: ‘je’ was not declared in this scope
     if(x&1){ans*=gop;ans%=je;}
                           ^
P1.cpp:9:27: error: ‘je’ was not declared in this scope
     x >>= 1;gop*=gop;gop%=je;
                           ^
P1.cpp:5:28: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
   scanf("%lld\n%lld",&a,&x);
                            ^