結果
| 問題 |
No.71 そろばん
|
| コンテスト | |
| ユーザー |
kpinkcat
|
| 提出日時 | 2023-10-14 20:46:50 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 371 bytes |
| コンパイル時間 | 749 ms |
| コンパイル使用メモリ | 103,584 KB |
| 最終ジャッジ日時 | 2025-02-17 07:49:35 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
#include<iostream>
#include<iomanip>
#include<string>
#include<algorithm>
#include<vector>
#include<set>
#include<list>
#include<queue>
#include<math.h>
#include<bitset>
using ll = long long;
using namespace std;
int main(){
ll n, n1, n2, ans;
cin >> n;
(!(n % 2)) ? (n1 = n/2) : (n1 = n/2 + 1);
n2 = n - n1;
cout << (n2 + 1)*(n1 + 1) -1 << endl;
}
kpinkcat