Submission #19724

# Submission time Handle Problem Language Result Execution time Memory
19724 2016-02-25T04:58:56 Z yukariko 괄호 (kriii4_R) C++
0 / 100
0 ms 1720 KB
#include <bits/stdc++.h>
using namespace std;

#define MOD 1000000007
#define INF 987654321

typedef long long lld;

lld gpow(lld a, lld x){
    if(x == 0) return 1;
    if(x < 1) return a%MOD;
    lld r = gpow(a, x/2)%MOD;
    if(x&1) return ((r*r)%MOD * (a%MOD))%MOD;
    return (r*r)%MOD;
}

int main(){
	lld n, k;
	while(~scanf("%lld %lld", &n, &k)){
		lld x = (n+1)/2;
		printf("%lld\n", (gpow(2, x)+MOD-(n%2!=0))%MOD);
	}
	return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 1720 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Halted 0 ms 0 KB -