結果
問題 | No.821 Making Integers |
ユーザー |
![]() |
提出日時 | 2019-04-26 21:51:08 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 597 ms / 2,000 ms |
コード長 | 253 bytes |
コンパイル時間 | 1,973 ms |
コンパイル使用メモリ | 192,528 KB |
最終ジャッジ日時 | 2025-01-07 03:08:34 |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 9 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int n, k; cin >> n >> k; long long ans = 1; for (int i = 0; i < k; i++) { ans += n - i; } cout << ans << endl; }