• + 0 comments

    C++ code

    #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 D,M,Y,d,m,y,fine=0;
        cin>>D>>M>>Y;
        cin>>d>>m>>y;
        if(D>d&&M==m&&y==Y)
            fine=15*(D-d);
        else if(M>m&&y==Y)
            fine=500*(M-m);
        else if(Y>y)
            fine=10000;
        
        cout<<fine;
        
        
        return 0;
    }