結果
| 問題 |
No.821 Making Integers
|
| コンテスト | |
| ユーザー |
tekihei2317
|
| 提出日時 | 2019-04-26 21:47:23 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 254 bytes |
| コンパイル時間 | 1,481 ms |
| コンパイル使用メモリ | 165,452 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-25 03:05:15 |
| 合計ジャッジ時間 | 1,975 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 |
ソースコード
#include<bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(n);i++)
#define ALL(v) (v).begin(),(v).end()
#define SZ(x) ((int)(x).size())
#define int long long
using namespace std;
signed main()
{
int N,K; cin>>N>>K;
cout<<((N-K+1)+N)*K/2+1<<endl;
}
tekihei2317