結果
問題 |
No.2655 Increasing Strides
|
ユーザー |
![]() |
提出日時 | 2024-03-01 21:22:52 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 380 bytes |
コンパイル時間 | 2,018 ms |
コンパイル使用メモリ | 191,032 KB |
最終ジャッジ日時 | 2025-02-19 22:14:21 |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 24 WA * 10 |
ソースコード
#include <bits/stdc++.h> #ifdef LOCAL #include "./debug.cpp" #else #define debug(...) #define print_line #endif using namespace std; using ll = long long; int main() { int N; cin >> N; ll sum = 0; for (int i = 1; i <= N; i++) { if (i % 2) { sum += i; } else { sum -= i; } } puts(sum == 0 ? "Yes" : "No"); }