如何证明我的做法的正确性?
查看原帖
如何证明我的做法的正确性?
857323
linxuanrui楼主2023/10/13 20:26

rt

#include<bits/stdc++.h>
#define endl '\n'
typedef long long ll;
using namespace std;
ll k,a,b;
int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	cin >> k >> a >> b;
	cout << (ll)(floor((long double)b * 1.0 / k) - (ceil((long double)a * 1.0 / k)) + 1);
}
2023/10/13 20:26
加载中...