定价
定价
题解
此题就是一个模拟题。你只需要从开始枚举末尾为5与0的数,记录最小值即可。
源码
#include<cstdio>
#include<cmath>
#include<iostream>
using namespace std;
typedef long long LL;
const LL INF=0x3f3f3f3f;
LL t,l,r;
/*#define gc() (p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<22,stdin),p1 == p2)?EOF:*p1++)
char buf[(1<<22)],*p1=buf,*p2=buf;*/
#define gc() getchar()
template<typename _T>
inline void read(_T &x)
{
int f=1;x=0;char s=gc();
while(s>'9'||s<'0'){if(s=='-')f=-1;s=gc();}
while(s>='0'&&s<='9'){x=(x<<3)+(x<<1)+(s^48);s=gc();}
x*=f;
}
LL score(LL x)
{
LL res=0,b=x;

浙公网安备 33010602011771号