Skip to content

Instantly share code, notes, and snippets.

@interpol-kun
Created June 9, 2014 10:09
Show Gist options
  • Save interpol-kun/29cb510f7cd336a4d9ac to your computer and use it in GitHub Desktop.
Save interpol-kun/29cb510f7cd336a4d9ac to your computer and use it in GitHub Desktop.
#include <stdio.h>
int main()
{
int N;
scanf("%d", &N);
int E[N], i, result, maxresult = 0;
for (i = 0; i<N; i++)
{
scanf("%d", E[i]);
}
for (i = 0; i<N; i++)
{
if (i+7<N)
{
result = E[i]*E[i+7];
if(result > maxresult)
maxresult = result;
}
}
printf("%d", maxresult);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment