1 solutions

  • 0
    @ 2022-5-27 22:27:54
    #include <bits/stdc++.h>
    using namespace std;
    #define accelerate ios::sync_with_stdio(false),cin.tie(0),cout.tie(0)
    #define endl "\n";
    #define mod 12345
    #define ll long long
    #define PII pair<int,int>
    #define INF 0x3f3f3f3f
    const int N=1e2+10;
    ll n,m,k,x,y,T;
    int main(){
    	accelerate;
    	cin>>n>>m;
    	ll ans=0;
    	ans+=m/n;
    	x=m/n;
    	while(x>=2){
    		ans+=x/2;
    		x=x-x/2*2+x/2;
    	}
    	cout<<ans;
    	return 0;
    }
    
    • 1

    Information

    ID
    713
    Time
    1000ms
    Memory
    16MiB
    Difficulty
    10
    Tags
    # Submissions
    4
    Accepted
    4
    Uploaded By