結果
問題 |
No.2426 Select Plus or Minus
|
ユーザー |
|
提出日時 | 2023-08-18 23:37:03 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 972 bytes |
コンパイル時間 | 1,383 ms |
コンパイル使用メモリ | 167,448 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-28 11:08:35 |
合計ジャッジ時間 | 8,049 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 41 |
ソースコード
#include <bits/stdc++.h> //#include <atcoder/all> using namespace std; //using namespace atcoder; #define rep(i,a,n) for (int i = a; i < (n); i++) #define all(x) (x).begin(),(x).end() using ll = long long; using P = pair<int,int>; using Graph = vector<vector<int>>; int mod = 998244353; int INF = 1001001001; using pll = pair<int,int>; int Flag=0; //デフォルトでNoがでる void yn(int Flag){ if(Flag==1){ cout<<"Yes"<<endl; } else if(Flag==0){ cout<<"No"<<endl; } else{ cout<<"Draw"<<endl; } } void cerrVec(vector<string> &V){ int n=V.size(); rep(i,0,n){ for(auto x:V[i]){ cerr<<x<<" "; } cerr<<endl; } cerr<<endl; } /* int H,W; cin>>H>>W; vector<vector<char>> C(H,vector<char> (W)); rep(i,0,H) rep(j,0,W) cin>>C[i][j]; */ int main(){ ll K; cin>>K; while(K!=1){ if(K%2){ K*=3; K++; cout<<"+"; } else{ K/=2; cout<<"/"; } //cerr<<K<<endl; } }