Submission #988861

#TimeUsernameProblemLanguageResultExecution timeMemory
988861user736482Rack (eJOI19_rack)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; long long a,b,c; int main() { cin>>a>>b; b--; while(a!=0){ a--; c=c*2%1e9+7; c+=b%2; b/=2; } cout<<c+1; return 0; }

Compilation message (stderr)

rack.cpp: In function 'int main()':
rack.cpp:10:14: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
   10 |         c=c*2%1e9+7;
      |           ~~~^~~~
      |            |  |
      |            |  double
      |            long long int