1 solutions

  • 0
    @ 2025-3-3 16:33:39

    C++ :

    #include<bits/stdc++.h> 
    using namespace std; 
    
    int main(){ 
    	double n,x,y;
    	cin>>n>>x>>y;
    	
    	cout<<(int)((n * 1000 + y * 10) / (x * 10 + y * 10));
    
    	return 0; 
    } 
    

    Python :

    sr=input().split()
    n=float(sr[0])*100
    k=float(sr[1])
    j=float(sr[2])
    m=n//(k+j)
    y=n%(k+j)
    if y>=k:
        print("%d"%(m+1))
    else:
        print("%d"%m)
    
    • 1

    Information

    ID
    10640
    Time
    1000ms
    Memory
    16MiB
    Difficulty
    (None)
    Tags
    # Submissions
    0
    Accepted
    0
    Uploaded By