답안 #19547

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
19547 2016-02-24T17:37:49 Z Namnamseo Ω (kriii4_P3) C++14
0 / 100
0 ms 1084 KB
#include <cstdio>
typedef long long ll;
const int M=int(1e9)+7;
ll pow(ll a,ll b){
    if(b==0) return 1%M;
    ll ret=pow(a,b/2);
    ret=(ret*ret)%M;
    if(b&1) ret=(ret*a)%M;
    return ret;
}
int main()
{
    int p,q,n,k;
    scanf("%d%d%d%d",&p,&q,&n,&k);
    ll bunja = (pow(2,k)+M-1)%M;
    ll bunmo = (pow(2,n)+M-1)%M;
    printf("%d\n",int( bunja*pow(bunmo,M-2)%M ));
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 1084 KB Output is correct
2 Correct 0 ms 1084 KB Output is correct
3 Correct 0 ms 1084 KB Output is correct
4 Correct 0 ms 1084 KB Output is correct
5 Correct 0 ms 1084 KB Output is correct
6 Correct 0 ms 1084 KB Output is correct
7 Correct 0 ms 1084 KB Output is correct
8 Correct 0 ms 1084 KB Output is correct
9 Correct 0 ms 1084 KB Output is correct
10 Correct 0 ms 1084 KB Output is correct
11 Incorrect 0 ms 1084 KB Output isn't correct
12 Halted 0 ms 0 KB -