in the KIIT Coding Weekends competition I tried the Large Products problem. My code works successfully on CodeBlocks and ideone.com it results in a ‘Wrong Answer’ in the codeChef IDE.
Can anyone try to help me…
here is my code…
#include <iostream>
using namespace std;
int main()
{
long long n;
cin>>n;
long long a[n];
for(long long i=0;i<n;i++)
{
cin>>a[i];
}
long long p=1;
for(long long i=0;i<n;i++)
{
p*=a[i];
}
cout<<p+(1000000007)%(1000000007)<<" "<<endl;
}