代码黑科技

快读:

#include
using namespace std;
#define ll long long
ll read()
{
    ll f=1,x=0;
    char ss=getchar();
    while(ss<'0'||ss>'9'){if(ss=='-')f=-1;ss=getchar();}
    while(ss>='0'&&ss<='9'){x=x*10+ss-'0';ss=getchar();}
    return x*f;
}
int main()
{
    ll b;
    b=read();
    cout<

快写:

#include
using namespace std;
#define ll long long
inline void write(ll x)
{
     if(x<0) putchar('-'),x=-x;
     if(x>9) write(x/10);
     putchar(x%10+'0');
}
int main()
{
    ll b;
    b=read();
   write(b);
}

快速幂:

ll ksm(ll,a,ll b)
{
    int ans=1,base=a;
    while(b!=0)
    {
        if(b&1!=0)
        {
            ans*=base;
        }
        base*=base;
        b>>=1;
    }
    
}

你可能感兴趣的:(代码黑科技工具)