Submission #23569

#TimeUsernameProblemLanguageResultExecution timeMemory
23569TAMREF카드 (GA8_card)C++11
100 / 100
0 ms2020 KiB
#include <bits/stdc++.h> using namespace std; int main(){ int N, sum=0, m=0; scanf("%d",&N); for(int i=0,x;i<N;i++){ scanf("%d",&x); sum+=x,m=max(m,x); } printf("%d\n",sum-m); }

Compilation message (stderr)

card.cpp: In function 'int main()':
card.cpp:5:19: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&N);
                   ^
card.cpp:7:23: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d",&x);
                       ^
#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...