Submission #57242

# Submission time Handle Problem Language Result Execution time Memory
57242 2018-07-14T10:46:32 Z babo 창문 (kriii4_C) C++14
100 / 100
4 ms 936 KB
#include <bits/stdc++.h>
#define L long long
#define mod 1000000007

using namespace std;

L mult(L x,L y){
	if(y==1) return x;
	L temp=mult(x,y/2);
	if(y%2) return (temp+temp+x)%mod;
	else return (temp+temp)%mod;
}

L n,m;

int main()
{
	scanf("%lld %lld",&n,&m);
	printf("%lld\n",mult(n+2,m+2));
}

Compilation message

C.cpp: In function 'int main()':
C.cpp:18:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%lld %lld",&n,&m);
  ~~~~~^~~~~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 616 KB Output is correct
3 Correct 2 ms 692 KB Output is correct
4 Correct 2 ms 932 KB Output is correct
5 Correct 3 ms 932 KB Output is correct
6 Correct 2 ms 932 KB Output is correct
7 Correct 2 ms 932 KB Output is correct
8 Correct 3 ms 932 KB Output is correct
9 Correct 2 ms 932 KB Output is correct
10 Correct 3 ms 932 KB Output is correct
11 Correct 3 ms 932 KB Output is correct
12 Correct 2 ms 932 KB Output is correct
13 Correct 2 ms 932 KB Output is correct
14 Correct 3 ms 932 KB Output is correct
15 Correct 2 ms 932 KB Output is correct
16 Correct 2 ms 932 KB Output is correct
17 Correct 2 ms 932 KB Output is correct
18 Correct 2 ms 932 KB Output is correct
19 Correct 2 ms 932 KB Output is correct
20 Correct 3 ms 932 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 932 KB Output is correct
2 Correct 3 ms 936 KB Output is correct
3 Correct 2 ms 936 KB Output is correct
4 Correct 3 ms 936 KB Output is correct
5 Correct 3 ms 936 KB Output is correct
6 Correct 4 ms 936 KB Output is correct
7 Correct 4 ms 936 KB Output is correct
8 Correct 3 ms 936 KB Output is correct
9 Correct 3 ms 936 KB Output is correct
10 Correct 3 ms 936 KB Output is correct
11 Correct 2 ms 936 KB Output is correct
12 Correct 2 ms 936 KB Output is correct
13 Correct 2 ms 936 KB Output is correct
14 Correct 2 ms 936 KB Output is correct
15 Correct 3 ms 936 KB Output is correct
16 Correct 3 ms 936 KB Output is correct
17 Correct 3 ms 936 KB Output is correct
18 Correct 3 ms 936 KB Output is correct
19 Correct 3 ms 936 KB Output is correct
20 Correct 3 ms 936 KB Output is correct