We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Summing the N series
Summing the N series
Sort by
recency
|
375 Discussions
|
Please Login in order to post a comment
Java 8
return (int)(((n%1000000007)*(n%1000000007))%1000000007);
In C++:
} `
def summingSeries(n): s=(n*n)%(1000000007) return s
Tried BigInt in js, but cannot pass all test cases.