結果
| 問題 | No.821 Making Integers |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-04-26 21:30:52 |
| 言語 | C++14 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 2,000 ms |
| + 265µs | |
| コード長 | 558 bytes |
| 記録 | |
| コンパイル時間 | 812 ms |
| コンパイル使用メモリ | 182,436 KB |
| 実行使用メモリ | 9,848 KB |
| 最終ジャッジ日時 | 2026-09-29 14:34:54 |
| 合計ジャッジ時間 | 1,849 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge4_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 |
ソースコード
#include"bits/stdc++.h"
using namespace std;
using ll = long long;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
#define FOR(k,m,n) for(ll (k)=(m);(k)<(n);(k)++)
#define REP(i,n) FOR((i),0,(n))
#define WAITING(str) int str;std::cin>>str;
#define DEBUGING(str) cout<< #str << " " str<<endl
constexpr int INF = (1 << 30);
constexpr ll INFL = (1ll << 60);
constexpr ll MOD = 1000000007;// 10^9+7
int main()
{
ll N, K, res = 0;
cin >> N >> K;
res += K * N;
res -= K * (K - 1) / 2;
cout << res + 1 << endl;
return 0;
}