0_0_31513615_8399.cpp: In function 'long long int S(long long int)': 0_0_31513615_8399.cpp:54:3: error: 'ans' was not declared in this scope ans = ((ans - 1ll * (L + R) * (R - L+ 1) % mod * inv2 % mod * S(n / L) % mod) % mod + mod) % mod; ^