5 solutions

  • 1
    @ 2025-12-10 20:24:01

    #include<bits/stdc++.h> using namespace std; int main() {

    int t;
    char c;
    cin>>t>>c;
    int s=8;
    t=t-1000;
    if(t>0)
    {
    	int h=t/500;
    	if(t%500!=0)
    	{
    		h=h+1;
    	}
    	s=s+h*4;
    }
    if(c=='y')
    {
    	s=s+5;
    }
    cout<<s;
    return 0; 
    

    }

    Information

    ID
    857
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    3
    Tags
    (None)
    # Submissions
    526
    Accepted
    108
    Uploaded By