-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaoj0216.cpp
57 lines (50 loc) · 971 Bytes
/
aoj0216.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#include <iostream>
#include <stdio.h>
#include <sstream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <algorithm>
#include <set>
#include <math.h>
#include <utility>
#include <stack>
#include <string.h>
#include <complex>
using namespace std;
const int INF = 1<<29;
const double EPS = 1e-8;
typedef vector<int> vec;
typedef pair<int,int> P;
typedef pair<int,P> iP;
int main(){
while(1){
int w;
scanf("%d",&w);
if(w==-1)break;
int cost=1150;
w -= 10;
if(0<w){
if(w>10){
cost += 1250;
}else{
cost += w * 125;
}
}
w -= 10;
if(0<w){
if(w>10){
cost += 1400;
}else{
cost += w * 140;
}
}
w -= 10;
if(0<w){
cost += w * 160;
}
cout << 4280-cost << endl;
}
return 0;
}