結果
問題 |
No.3048 Swing
|
ユーザー |
|
提出日時 | 2025-03-15 00:26:30 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 216 bytes |
コンパイル時間 | 2,612 ms |
コンパイル使用メモリ | 192,400 KB |
実行使用メモリ | 7,328 KB |
最終ジャッジ日時 | 2025-03-15 00:26:39 |
合計ジャッジ時間 | 8,825 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 WA * 53 TLE * 2 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { int x,n; cin >> x >> n; for(int i = 1; i<=n; i++){ if(x<=0) x += i; else x-=i; } cout << x; // your code goes here }