結果
問題 |
No.3048 Swing
|
ユーザー |
|
提出日時 | 2025-03-15 00:28:12 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 295 bytes |
コンパイル時間 | 2,360 ms |
コンパイル使用メモリ | 192,836 KB |
実行使用メモリ | 15,032 KB |
最終ジャッジ日時 | 2025-03-15 00:28:19 |
合計ジャッジ時間 | 5,918 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 2 TLE * 1 -- * 56 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); long long int x,n; cin >> x >> n; for(long long int i = 1; i<=n; i++){ if(x<=0) x += i; else x-=i; } cout << x; // your code goes here }