This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <fstream>
using namespace std;
FILE *fin = fopen("input.txt","r");
FILE *fout = fopen("output.txt","w");
int main()
{
int i, j, k, n;
long long int sum1;
fscanf(fin,"%d",&n);
for(i=1;i<=n;i++)
{
fscanf(fin,"%d %d %d",&i, &j, &k);
sum1 = (i + j) * (i + j) + k * k;
//fprintf(fout,"sum1 = (%d + %d) ^ 2 + %d ^ 2 = %d\n",i, j, k, sum1);
fprintf(fout,"%lld",sum1);
}
fclose(fin);
fclose(fout);
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |