Created
March 26, 2014 13:57
-
-
Save yakk512/9783652 to your computer and use it in GitHub Desktop.
Atcoder Beginner Contest001
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<vector> | |
#include<cstdio> | |
#include<string> | |
#include<algorithm> | |
#include<numeric> | |
#include<map> | |
#include<math.h> | |
using namespace::std; | |
int main(void) | |
{ | |
int H1,H2; | |
cin >> H1; | |
cin >> H2; | |
cout << H1 - H2 << endl; | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<vector> | |
#include<cstdio> | |
#include<string> | |
#include<algorithm> | |
#include<numeric> | |
#include<map> | |
#include<math.h> | |
using namespace::std; | |
int main(void) | |
{ | |
int m; | |
int vv; | |
cin >> m; | |
if( m < 100 ) | |
{ | |
vv = 0; | |
} | |
else if( 100 <= m && m <= 5000 ) | |
{ | |
vv = m / 100; | |
} | |
else if( 6000 <= m && m <= 30000 ) | |
{ | |
vv = (m / 1000) + 50; | |
} | |
else if( 35000 <= m && m <= 70000 ) | |
{ | |
vv = ( ( m / 1000 ) - 30 ) / 5 + 80; | |
} | |
else | |
{ | |
vv = 89; | |
} | |
if( m < 1000 ) | |
{ | |
cout << 0; | |
} | |
cout << vv << endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment