結果

問題 No.821 Making Integers
ユーザー 👑 obakyan
提出日時 2019-04-26 21:37:41
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 367 bytes
コンパイル時間 667 ms
コンパイル使用メモリ 71,536 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-25 02:20:42
合計ジャッジ時間 1,055 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cstdio>
#include <cstdlib>
#include <cstddef>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
#include <iostream>
#include <iomanip>
#define L64 long long
#define MOD (998244353LL)

int counter = 0;

int main(void)
{
  L64 a, b;
  std::cin >> a >> b;
  L64 ret = ((a + (a - b + 1)) * b) / 2 + 1;
  std::cout << ret << std::endl;
}
0