結果
| 問題 | No.278 連続する整数の和(2) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-09-04 22:49:19 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 240 bytes |
| 記録 | |
| コンパイル時間 | 512 ms |
| コンパイル使用メモリ | 70,720 KB |
| 実行使用メモリ | 78,688 KB |
| 最終ジャッジ日時 | 2026-04-02 13:19:22 |
| 合計ジャッジ時間 | 2,131 ms |
|
ジャッジサーバーID (参考情報) |
judge5_1 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 WA * 15 |
ソースコード
#include <iostream>
#include <cstdio>
using namespace std;
int main() {
long long n, ans;
cin >> n;
if (n % 2 == 1) {
ans = 1 + n;
} else if (n == 2) {
ans = 1;
} else {
ans = 1 + n / 2;
}
cout << ans << endl;
return 0;
}