Skip to content

Instantly share code, notes, and snippets.

@Shirataki2
Last active November 24, 2017 13:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Shirataki2/4d42e26d5535e7d109274cac2feb238d to your computer and use it in GitHub Desktop.
Save Shirataki2/4d42e26d5535e7d109274cac2feb238d to your computer and use it in GitHub Desktop.
#include "bits/stdc++.h"
using namespace std;
static const int inf = 1<<30;
int VV(int val){
if(val < 100) return 0;
if(val <= 5000) return val/100;
if(val <= 30000) return 50+val/1000;
if(val <= 70000) return (val-30000)/5000 + 80;
return 89;
}
int main(void){
int m;
cin >> m;
cout << setw(2) << setfill('0') << VV(m) << endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment