防止你会写A+B problem
输入一行两个正整数
A,B ,保证1 \le A,B \le 10^9 。
输出一行一个正整数A+B 。
稍微推导一下:
于是我们就可以写出会报错的代码:
//A+B problem
//A+B=(floor(A/B)+1)*B+A mod B
#include<bits/stdc++.h>
using namespace std;
int *a=new int,*b=new int;
int main(){
cin>>*a>>*b;
cout<<(*a/*b+1)*(*b)+(*a)%(*b);
return 0;
}