Submission #5818789
Source Code Expand
#include<iostream> using namespace std; long long a,b,k; int main() { cin>>k>>a>>b; if(k<=a)cout<<"1"<<endl; else if(a<=b) cout<<"-1"<<endl; else cout<<((k-a)/(a-b)+bool((k-a)%(a-b)))<<1|1)<<endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - Kaiden |
User | luogu_bot5 |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 239 Byte |
Status | CE |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:9:50: error: no match for ‘operator|’ (operand types are ‘std::basic_ostream<char>’ and ‘int’) else cout<<((k-a)/(a-b)+bool((k-a)%(a-b)))<<1|1)<<endl; ^ ./Main.cpp:9:50: note: candidate: operator|(int, int) <built-in> ./Main.cpp:9:50: note: no known conversion for argument 1 from ‘std::basic_ostream<char>’ to ‘int’ In file included from /usr/include/c++/5/ios:42:0, from /usr/include/c++/5/ostream:38, from /usr/include/c++/5/iostream:39, from ./Main.cpp:1: /usr/include/c++/5/bits/ios_base.h:87:3: note: candidate: constexpr std::_Ios_Fmtflags std::operator|(std::_Ios_Fmtflags, std::_Ios_Fmtflags) operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b) ^ /usr/include/c++/5/bits/ios_base.h:87:3: note: no known conversion for argument 1 from ‘std::basic_ostream<char>’ to ‘std::_Ios_Fmtflags’ /usr/include/c++/5/bits/ios_base.h:129:3: note: candidate: constexpr...