Submission #80006

#TimeUsernameProblemLanguageResultExecution timeMemory
80006pzdbaKošnja (COCI17_kosnja)C++14
50 / 50
22 ms868 KiB
#include <bits/stdc++.h> using namespace std; int main(){ int k, n, m; scanf("%d", &k); for(int i=1;i<=k;i++){ scanf("%d%d", &n, &m); n = min(n, m); if(n == 1) printf("1\n"); else printf("%d\n", 2 + (n-2)*2); } }

Compilation message (stderr)

kosnja.cpp: In function 'int main()':
kosnja.cpp:6:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", &k);
  ~~~~~^~~~~~~~~~
kosnja.cpp:8:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d%d", &n, &m);
   ~~~~~^~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...