結果
問題 | No.821 Making Integers |
ユーザー |
![]() |
提出日時 | 2019-04-26 12:57:33 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 168 bytes |
コンパイル時間 | 624 ms |
コンパイル使用メモリ | 53,332 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-24 04:45:59 |
合計ジャッジ時間 | 1,036 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 9 |
ソースコード
#include <iostream> #include <cassert> using namespace std; long long n,k; int main(){ cin>>n>>k; assert(1<=k&&k<=n&&n<=1000000000); cout<<(2*n-k+1)*k/2+1<<endl; }