HDU

来源:互联网 发布:fatego斯卡哈技能数据 编辑:程序博客网 时间:2024/06/04 22:39
#include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>#include <string>#include <cmath>#include <set>#include <map>#include <stack>#include <queue>#include <ctype.h>#include <vector>#include <algorithm>#include <sstream>#define PI acos(-1.0)#define in freopen("in.txt", "r", stdin)#define out freopen("out.txt", "w", stdout)using namespace std;typedef long long ll;const int maxn = 500 + 7, INF = 0x3f3f3f3f, mod = 1e9 + 7;ll n, k;int main() {    while(scanf("%lld %lld", &n, &k) != EOF) {        cout << ((n-k)*k+k) << endl;    }    return 0;}