Submission #19692

#TimeUsernameProblemLanguageResultExecution timeMemory
19692ainta창문 (kriii4_C)C++98
100 / 100
0 ms1084 KiB
#include<stdio.h> long long Mod = 1000000007; long long Inv(long long a){ long long r = 1,b=Mod-2; while(b){ if(b%2)r=r*a%Mod; a=a*a%Mod,b/=2; } return r; } int main(){ long long a, b; scanf("%lld%lld",&a,&b); a%=Mod,b%=Mod; printf("%lld\n",(a+2)*Inv(3)%Mod*(b+2)%Mod*Inv(3)%Mod*9%Mod); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...