题解:P9390 金盏花
lailai0916 · · 题解
题意简述
给定六位整数
解题思路
令
参考代码
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
const ll M=1000000;
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
ll y,z;
cin>>y>>z;
cout<<abs(clamp((z-y+M/2)/M,100000ll,999999ll)*M+y-z)<<'\n';
return 0;
}