0_0_22806520_26404.cpp: In function 'int main()': 0_0_22806520_26404.cpp:18:38: error: 'mod' was not declared in this scope ans = (ans + (a[i] * i % mod) * (n - i + 1) % mod) % mod; ^