結果
問題 | No.821 Making Integers |
ユーザー |
|
提出日時 | 2019-08-19 23:19:36 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 337 ms / 2,000 ms |
コード長 | 235 bytes |
コンパイル時間 | 1,609 ms |
コンパイル使用メモリ | 165,824 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-05 09:46:34 |
合計ジャッジ時間 | 2,434 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 9 |
ソースコード
typedef long long ll; #include <bits/stdc++.h> using namespace std; int main() { ll n,k; std::cin >> n>>k; ll sum = 1; for (int i = 1; i <= k; i++) { sum += n-(i-1); } std::cout << sum << std::endl; }