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 <cstdio>
int main() {
int T;
scanf("%d",&T);
while(T--) {
int a,b,c;
scanf("%d %d %d",&a,&b,&c);
int sum = a+b+c;
int max = -1;
if( max < a ) max = a;
if( max < b ) max = b;
if( max < c ) max = c;
sum -= max;
long long ans = (long long)sum*sum + (long long)max*max;
printf("%lld\n",ans);
}
}
# | 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... |