Submission #5565957


Source Code Expand

 #include <bits/stdc++.h>
  2 using namespace std;
  3
  4 #define REP(i, n) for(int i=0; i < (n); ++i)
  5 #define REPR(i, n) for(int i=(n); i >= 0; --i)
  6 #define FOR(i, m, n) for(itn i=(m); i < (n); ++i)
  7
  8 typedef long long ll;
  9
 10 int main(){
 11    int N, M;
 12    cin >> N >> M;
 13    double ans = 0;
 14    int beki = 1;
 15    for(int i=0; i < M; ++i){
 16       beki*=2;
 17    }
 18    int time = (N-M)*100+M*1900;
 19    int sumt = time;
 20    while(beki <= 10 * sumt){
 21       ans +=(double) sumt/beki;
 22       beki *=2;
 23       sumt += time;
 24    }
 25    cout << (int)ans << endl;
 26    return 0;
 27 }                   

Submission Info

Submission Time
Task C - HSI
User tune
Language C++14 (GCC 5.4.1)
Score 0
Code Size 685 Byte
Status CE

Compile Error

./Main.cpp:4:5: error: stray ‘#’ in program
   4 #define REP(i, n) for(int i=0; i < (n); ++i)
     ^
./Main.cpp:5:5: error: stray ‘#’ in program
   5 #define REPR(i, n) for(int i=(n); i >= 0; --i)
     ^
./Main.cpp:6:5: error: stray ‘#’ in program
   6 #define FOR(i, m, n) for(itn i=(m); i < (n); ++i)
     ^
./Main.cpp:2:3: error: expected unqualified-id before numeric constant
   2 using namespace std;
   ^
./Main.cpp:3:3: error: expected unqualified-id before numeric constant
   3
   ^
./Main.cpp:4:36: error: ‘i’ does not name a type
   4 #define REP(i, n) for(int i=0; i < (n); ++i)
                                    ^
./Main.cpp:4:45: error: expected unqualified-id before ‘++’ token
   4 #define REP(i, n) for(int i=0; i < (n); ++i)
                                             ^
./Main.cpp:5:39: error: ‘i’ does not name a type
   5 #define REPR(i, n) for(int i=(n); i >= 0; --i)
                                       ^
./Main.cpp:5:47: error: expected unqualified-id before ‘--’ token
   5 #define RE...