-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDay9_z26_Nested Logic.cpp
More file actions
48 lines (43 loc) · 876 Bytes
/
Day9_z26_Nested Logic.cpp
File metadata and controls
48 lines (43 loc) · 876 Bytes
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
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
int rd;
int rm;
int ry;
cin>>rd;
cin>>rm;
cin>>ry;
int dd;
int dm;
int dy;
cin>>dd;
cin>>dm;
cin>>dy;
int ml = rm - dm;
int dl = rd - dd;
if(ry < dy){
int fine = 0;
cout<<fine<<endl;
}else if((ry - dy) >= 1){
int fine = 10000;
cout<<fine<<endl;
}else if(rm > dm){
int fine = 500 * ml;
cout<<fine<<endl;
}else if(rm < dm){
int fine = 0;
cout<<fine<<endl;
}else if(rd > dd){
int fine = 15 * dl;
cout<<fine<<endl;
}else{
int fine= 0;
cout<<fine<<endl;
}
return 0;
}