#include <bits/stdc++.h>
using namespace std;
#define int long long
#define pii pair<int,int>
#define fir first
#define sec second
const int inf=0x3f3f3f3f3f3f3f3f;
#define m99 998244353
const int mod=m99;
//const int mod=1e9+7
#define chmax(a,b) a=max(a,b)
#define chmin(a,b) a=min(a,b)
#define popcount(x) __builtin_popcount(x)
void eadd(int &a,int b){a=(a+b)%mod;}
void esub(int &a,int b){a=((a-b)%mod+mod)%mod;}
void emul(int &a,int b){a=(a*b)%mod;}
int add(int a,int b){return (a+b)%mod;}
int sub(int a,int b){return ((a-b)%mod+mod)%mod;}
int mul(int a,int b){return (a*b)%mod;}
void judge(bool b){cout<<(b?"yes":"no");}
void Judge(bool b){cout<<(b?"Yes":"No");}
void JUDGE(bool b){cout<<(b?"YES":"NO");}
#define outlen(X) fixed<<setprecision(X)
void inputarr(int l,int r,int *a){for(int i=l;i<=r;i++)cin>>a[i];}
void putstr(string s){cout<<s<<endl;}
#define cleararr(a) memset(a,0,sizeof(a))
#define setmaxarr(a) memset(a,0x3f,sizeof(a))
#define setminarr(a) memset(a,-0x3f,sizeof(a))
#define nxtl cout<<endl
int disc(int l,int r,int *a){sort(a+l,a+r+1);return unique(a+l,a+r+1)-a-l;}
#define uomap unordered_map
inline int read()
{
register int x=0,t=1;
register char ch=getchar();
while(ch<'0'||ch>'9')
{
if(ch=='-')
t=-1;
ch=getchar();
}
while(ch>='0'&&ch<='9')
{
x=(x<<1)+(x<<3)+(ch^48);
ch=getchar();
}
return x*t;
}
inline void write(int x)
{
if(x<0){
putchar('-');
x=-x;
}
if(x>9)
write(x/10);
putchar(x%10+'0');
}
#define rep(i,l,r) for(int i=l;i<=r;i++)
#define drep(i,r,l) for(int i=r;i>=l;i--)
int min(int a,int b,int c){return min(a,min(b,c));}
int max(int a,int b,int c){return max(a,max(b,c));}
#define pb push_back
#define beg begin()
#define end end()
#define siz size()
#define ls (rt<<1)
#define rs ((rt<<1)|1)
const int jc_maxn=1e4;
int jc[jc_maxn+10],jcn[jc_maxn+10];
int quickpow(int x,int p)
{
int base=x;
int ans=1;
while(p)
{
if(p&1)ans=ans*base%mod;
p>>=1;
base=base*base%mod;
}
return ans%mod;
}
void C_init()
{
jc[0]=jc[1]=1;
for(int i=2;i<=jc_maxn;i++)jc[i]=jc[i-1]*i%mod;
jcn[jc_maxn]=quickpow(jc[jc_maxn],mod-2);
for(int i=jc_maxn-1;i>=0;i--)jcn[i]=jcn[i+1]*(i+1)%mod;
}
int C(int n,int m)
{
if(m<0)return 0;
if(m==0)return 1;
if(m>n)return 0;
return ((jc[n]*jcn[m])%mod*jcn[n-m])%mod;
}
int dsum(int x,int d,int len){if(len==0)return 0;return (2*x+d*(len-1))*len/2;}
int sqr(int x){return x*x;}
int cub(int x){return x*x*x;}
double sqr(double x){return x*x;}
double cub(double x){return x*x*x;}
int gcd(int a,int b){if(!b)return a;return gcd(b,a%b);}
int lcm(int a,int b){return a/gcd(a,b)*b;}
bool odd(int x){return (x%2);}
bool even(int x){return !(x%2);}
bool ismod(int x,int y){return !(x%y);}
bool isnmod(int x,int y){return (x%y);}
int roundmod(int x,int mod)
{
int l,r;
if(x<0)
{
l=-(abs(x)/mod+1)*mod;
r=l+mod;
}
else
{
l=x/mod*mod;
r=l+mod;
}
if(x-l>r-x)return r;
return l;
}
const int UF_maxn=2e5;
struct UF
{
int n,fa[UF_maxn+10];
void init(int _n)
{
n=_n;
for(int i=1;i<=n;i++)fa[i]=i;
}
int find(int x)
{
if(fa[x]==x)return x;
return fa[x]=find(fa[x]);
}
bool connected(int u,int v)
{
return (find(u)==find(v));
}
void insert(int u,int v)
{
if(!connected(u,v))fa[find(u)]=find(v);
}
};
const double precision=1e-6;
bool dequal(double a,double b){return (abs(a-b)<=precision);}
bool dless(double a,double b){return (b-a>=precision);}
bool dgreater(double a,double b){return (a-b>=precision);}
const int fibmaxn=30;
int fib[fibmaxn+10];
void fib_init(bool ismod)
{
fib[1]=fib[2]=1;
for(int i=3;i<=fibmaxn;i++)
if(ismod)fib[i]=add(fib[i-1],fib[i-2]);
else fib[i]=fib[i-1]+fib[i-2];
}
struct pos
{
double x,y;
pos(){}
pos(double _x,double _y)
{
x=_x,y=_y;
}
};
double dist(pos a,pos b){return sqrt(sqr(a.x-b.x)+sqr(a.y-b.y));}
double mht_dist(pos a,pos b){return abs(a.x-b.x)+abs(a.y-b.y);}
const double pi=acos(-1);
pos rotate_n(pos n,double angle)
{
angle*=pi;
angle/=180;
return pos(n.x*cos(angle)-n.y*sin(angle),n.y*cos(angle)+n.x*sin(angle));
}
double area(pos a,pos b,pos c)
{
double l1=dist(a,b),l2=dist(b,c),l3=dist(a,c);
double p=(l1+l2+l3)/2;
return sqrt(p*(p-l1)*(p-l2)*(p-l3));
}
double angle(pos a,pos c,pos b)
{
double x=atan2(a.x-c.x,a.y-c.y)-atan2(b.x-c.x,b.y-c.y);
if(x>pi)x-=2*pi;
if(x<-pi)x+=2*pi;
x=x*180/pi;
if(x<0)x=-x;
else x+=180;
return x;
}
struct circle
{
double r;
pos p;
circle(){}
circle(double _r,pos _p)
{
r=_r,p=_p;
}
};
bool iscol(circle a,circle b)
{
double dis=dist(a.p,b.p);
return (dgreater(a.r+b.r,dis)||dequal(a.r+b.r,dis))&&(dless(abs(a.r-b.r),dis)||dequal(abs(a.r-b.r),dis));
}
int lowbit(int x){return x&(-x);}
const int bit_maxn=2.5e5;
struct BIT
{
int n,c[bit_maxn+10],mod;
void init(int _n,int _mod)
{
n=_n,mod=_mod;
for(int i=1;i<=n;i++)c[i]=0;
}
int query(int x)
{
int ans=0;
while(x>0)
{
ans+=c[x];
if(mod)ans%=mod;
x-=lowbit(x);
}
return ans;
}
void update(int x,int v)
{
while(x<=n)
{
c[x]+=v;
if(mod)c[x]%=mod;
x+=lowbit(x);
}
}
};
const int mmaxn=10;
struct matrix
{
int n,m,mod;
int a[mmaxn+10][mmaxn+10];
void init(int _n,int _m,int _mod)
{
n=_n,m=_m,mod=_mod;
for(int i=1;i<=n;i++)
for(int j=1;j<=m;j++)
a[i][j]=0;
}
matrix operator*(matrix b)
{
matrix ans;
ans.init(n,b.m,mod);
if(m!=b.n)return *this;
for(int i=1;i<=n;i++)
for(int j=1;j<=b.m;j++)
for(int k=1;k<=m;k++)
ans.a[i][j]=(ans.a[i][j]+a[i][k]*b.a[k][j]%mod)%mod;
return ans;
}
void operator*=(matrix b)
{
matrix ans=(*this)*b;
*this=ans;
}
matrix operator^(int p)
{
matrix ans,base=*this;
ans.init(n,m,mod);
if(n!=m)return ans;
for(int i=1;i<=n;i++)ans.a[i][i]=1;
while(p)
{
if(p&1)ans*=base;
base*=base;
p>>=1;
}
return ans;
}
bool operator==(matrix b)
{
if(n!=b.n||m!=b.m)return 0;
for(int i=1;i<=n;i++)
for(int j=1;j<=m;j++)
if(a[i][j]!=b.a[i][j])
return 0;
return 1;
}
bool operator!=(matrix b)
{
return !(*this==b);
}
};
void pre_solve()
{
}
int a,b;
void main_solve(int test_id)
{
cin>>a>>b;
cout<<a*b-a-b;
return;
}
//#define IS_MULTI_TEST
signed main()
{
// ios::sync_with_stdio(false);
// cin.tie(0);
// cout.tie(0);
pre_solve();
#ifdef IS_MULTI_TEST
int t;
cin>>t;
while(t--)main_solve(t);
#else
main_solve(1);
#endif
return 0;
}
Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
Testcase #1 | 41.31 us | 40 KB | Accepted | Score: 5 | 显示更多 |
Testcase #2 | 38.58 us | 40 KB | Accepted | Score: 5 | 显示更多 |
Testcase #3 | 37.72 us | 40 KB | Accepted | Score: 5 | 显示更多 |
Testcase #4 | 37.46 us | 40 KB | Accepted | Score: 5 | 显示更多 |
Testcase #5 | 36.29 us | 40 KB | Accepted | Score: 5 | 显示更多 |
Testcase #6 | 36.64 us | 40 KB | Accepted | Score: 5 | 显示更多 |
Testcase #7 | 36.35 us | 40 KB | Accepted | Score: 5 | 显示更多 |
Testcase #8 | 37.7 us | 40 KB | Accepted | Score: 5 | 显示更多 |
Testcase #9 | 37.82 us | 40 KB | Accepted | Score: 5 | 显示更多 |
Testcase #10 | 37.51 us | 40 KB | Accepted | Score: 5 | 显示更多 |
Testcase #11 | 37.03 us | 40 KB | Accepted | Score: 5 | 显示更多 |
Testcase #12 | 37.03 us | 40 KB | Accepted | Score: 5 | 显示更多 |
Testcase #13 | 37.64 us | 40 KB | Accepted | Score: 5 | 显示更多 |
Testcase #14 | 37.51 us | 40 KB | Accepted | Score: 5 | 显示更多 |
Testcase #15 | 37.16 us | 40 KB | Accepted | Score: 5 | 显示更多 |
Testcase #16 | 37.51 us | 40 KB | Accepted | Score: 5 | 显示更多 |
Testcase #17 | 37.39 us | 40 KB | Accepted | Score: 5 | 显示更多 |
Testcase #18 | 37.38 us | 40 KB | Accepted | Score: 5 | 显示更多 |
Testcase #19 | 37.37 us | 40 KB | Accepted | Score: 5 | 显示更多 |
Testcase #20 | 37.41 us | 40 KB | Accepted | Score: 5 | 显示更多 |