Submission #8520

# Submission time Handle Problem Language Result Execution time Memory
8520 2014-09-16T00:52:57 Z eric4266 개미 (GA4_ant) C++
100 / 100
56 ms 1088 KB
#include <stdio.h>
unsigned long long i,t,x,y,z;unsigned long long ant(unsigned long long x,unsigned long long y,unsigned long long z){scanf("%llu%llu%llu",&x,&y,&z);if(x<=z&&y<=z)return(x+y)*(x+y)+z*z;else if(x<=y&&z<=y)return(x+z)*(x+z)+y*y;else return(y+z)*(y+z)+x*x;}int main(){scanf("%llu",&t);for(i=1;i<=t;i++){printf("%llu\n",ant(x,y,z));}}
# Verdict Execution time Memory Grader output
1 Correct 32 ms 1088 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 44 ms 1088 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 36 ms 1088 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 48 ms 1088 KB Output is correct
2 Correct 48 ms 1088 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 52 ms 1088 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 56 ms 1088 KB Output is correct
2 Correct 52 ms 1088 KB Output is correct
3 Correct 56 ms 1088 KB Output is correct
4 Correct 48 ms 1088 KB Output is correct
5 Correct 56 ms 1088 KB Output is correct