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<stdio.h>
int main()
{
int n, i;
long long mini=99999999999, k, a, b, c;
scanf("%d", &n);
for(i=1;i<=n;i++){
mini = 99999999999;
scanf("%lld %lld %lld", &a, &b, &c);
if(a*b<mini)mini=a*b;
if(b*c<mini)mini=b*c;
if(c*a<mini)mini=c*a;
k = a*a + b*b + c*c + 2 * mini;
printf("%lld\n", k);
}
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... |