Submission #19669

#TimeUsernameProblemLanguageResultExecution timeMemory
19669myungwoo창문 (kriii4_C)C++14
100 / 100
0 ms1084 KiB
#include<stdio.h> #define mod 1000000007 #define inv(a) exp(a,mod-2) typedef long long lld; lld a, b, sum; lld exp(lld a, lld b){ if(b==0)return 1; lld k=exp(a, b/2); k=(k*k)%mod; if(b%2)k=(k*a)%mod; return k; } lld h, w, h2, w2, hw; lld hdap, wdap, all; int main(){ scanf("%lld%lld", &h, &w), h%=mod, w%=mod; printf("%lld", (h+2)*(w+2)%mod); /* h2 = h*(h+1)%mod, w2 = w*(w+1)%mod; hw = h2*w2%mod; hdap = h2*(h+2)%mod, wdap = w2*(w+2)%mod; all = hdap*wdap%mod; printf("%lld", all*inv(hw)%mod);*/ return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...