結果
| 問題 |
No.2426 Select Plus or Minus
|
| コンテスト | |
| ユーザー |
0214sh7
|
| 提出日時 | 2023-08-17 20:18:21 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 459 bytes |
| コンパイル時間 | 1,581 ms |
| コンパイル使用メモリ | 193,104 KB |
| 最終ジャッジ日時 | 2025-02-16 09:00:34 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 35 WA * 6 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
const long long MOD = 998244353;
int main(void){
//cin.tie(nullptr);
//ios::sync_with_stdio(false);
long long N;
cin >> N;
string Ans;
while(N>1){
if(N%2==0){
Ans.push_back('/');
N /= 2;
}else{
Ans.push_back('+');
N = 3*N+1;
}
}
cout << (Ans.size()) << endl;
cout << Ans << endl;
return 0;
}
0214sh7