Submission #107310


Source Code Expand

Copy
#include <iostream>

int main()
{
  int m;
  std::cin >> m;
  if(m < 100)
    std::cout << 0 << std::endl;;
  else if(m <= 5000)
    std::cout << ((m < 1000)?("0"):("")) << m/100 << std::endl;
  else if(m <=30000)
    std::cout << m/1000 + 50 << std::endl;
  else if(m <= 70000)
    std::cout << (m/1000 - 30)/5 + 80 << std::endl;
  else
    std::cout << 89 << std::endl;
  return 0;
}

Submission Info

Submission Time
Task A - 積雪深差
User zarathID
Language C++ (G++ 4.6.4)
Score 0
Code Size 402 Byte
Status

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:9:3: error: ‘else’ without a previous ‘if’