2019独角兽企业重金招聘Python工程师标准>>> 巧克力是 M*N 的. 先切 N-1 刀,分成N条.每一条再切 M-1 刀(不能把不是一整块的巧克力一 起切). N-1+N*(M-1)=N*M+N-N-1=N*M-1; int main() { int m,n; while(~scanf("%d %d",&m,&n)) printf("%d\n",m*n-1); return 0; } 转载于:https://my.oschina.net/pandacub/blog/140360