Submission #20199

#TimeUsernameProblemLanguageResultExecution timeMemory
20199jjim9417개미 (GA4_ant)C++98
48 / 100
62 ms16 KiB
#include <iostream> #include <cstdio> #include <algorithm> using namespace std; int main(void){ int test; scanf("%d",&test); for (int i=0;i<test;i++){ int arr[3]; scanf("%d%d%d",&arr[0],&arr[1],&arr[2]); sort(arr,arr+3); printf("%llu\n",(unsigned long long)(arr[0]+arr[1])*(arr[0]+arr[1])+arr[2]*arr[2]); } return 0; }

Compilation message (stderr)

ant.cpp: In function 'int main()':
ant.cpp:9:22: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&test);
                      ^
ant.cpp:13:48: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d%d%d",&arr[0],&arr[1],&arr[2]);
                                                ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...