Submission #9837

# Submission time Handle Problem Language Result Execution time Memory
9837 2014-10-01T13:57:04 Z effserv Uniting (kriii2_U) C++
Compilation error
0 ms 0 KB
#include <cstdio>

using namespace std;

typedef long long ll;

int main()
{
	int N;
	scanf_s("%d", &N);

	ll a;
	scanf_s("%lld", &a);

	ll A = (ll)a;
	ll C = 0;

	for (int i = 0; i < N - 1; i++)
	{
		scanf_s("%lld", &a);
		C += A*a;
		A += a;
	}

	printf("%lld\n0", C);

	return 0;
}

Compilation message

U.cpp: In function 'int main()':
U.cpp:10:18: error: 'scanf_s' was not declared in this scope