Submission details
Task:Conjecture
Sender:🐟FishyGoldenBeetroot
Submission time:2015-10-07 16:49:00 +0300
Language:C++
Status:COMPILE ERROR

Compiler report

input/code.cpp: In function 'int main()':
input/code.cpp:10:15: error: no matching function for call to 'max(ll&, int)'
   n = max(n, 6);
               ^
input/code.cpp:10:15: note: candidates are:
In file included from /usr/include/c++/4.9/bits/char_traits.h:39:0,
                 from /usr/include/c++/4.9/ios:40,
                 from /usr/include/c++/4.9/istream:38,
                 from /usr/include/c++/4.9/sstream:38,
                 from /usr/include/c++/4.9/complex:45,
                 from /usr/include/c++/4.9/ccomplex:38,
                 from /usr/include/x86_64-linux-gnu/c++/4.9/bits/stdc++.h:52,
                 from input/code.cpp:1:
/usr/include/c++/4.9/bits/stl_algobase.h:217:5: note: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)
     max(const _Tp& __a, const _Tp& __b)
     ^
/usr/include/c++/4.9/bits/stl_algobase.h:217:5: note:   template argument deduction/substitution failed:
input/code.cpp:10:15: note:   deduced conflicting types for parameter 'c...

Code

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  ll n;
  cin >> n;
  n = max(n, 6);
  if(n % 3 == 2) {
    n = n + 2;
  } else {
    n = n + 1;
  }
  cout << n << "\n";
  return 0;
}