Submission #520531


Source Code Expand

#include <iostream>
using namespace std;

int main(){
  int m;

  cin >> m;

  if(m < 100){
    cout << "00" << endl;
  }else if(m >= 100 and m <= 5000){
    string outc = to_string(m/100);
    if(outc.length() == 1){
      outc = "0" + outc;
    }
    cout << outc << endl;
  }else if(m >= 6000 and m <= 30000){
    string outc = to_string(m/1000 + 50);
    cout << outc << endl;
  }else if(m >= 35000 and m <= 70000){
    string outc = to_string(((m-30)/5)+80);
    cout << outc << endl;
  }else if(m > 70000){
    cout << "89" << endl;
  }

  return 0;
}

Submission Info

Submission Time
Task B - 視程の通報
User cat12079801
Language C++ (G++ 4.6.4)
Score 0
Code Size 584 Byte
Status CE

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:12:34: error: ‘to_string’ was not declared in this scope
./Main.cpp:18:40: error: ‘to_string’ was not declared in this scope
./Main.cpp:21:42: error: ‘to_string’ was not declared in this scope