結果
| 問題 |
No.1822 Keima of Shogi
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-02-14 15:59:32 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 191 ms / 2,000 ms |
| コード長 | 238 bytes |
| コンパイル時間 | 1,517 ms |
| コンパイル使用メモリ | 165,312 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-29 06:50:39 |
| 合計ジャッジ時間 | 2,268 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main() {
long long N; cin >> N;
long long ans = 0;
long long cnt = 1;
for(int i = N-1; i >= 0; i -= 2) {
ans += cnt;
cnt++;
}
cout << ans << endl;
}