結果
| 問題 |
No.2535 多重同値
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-11-10 21:28:41 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 867 bytes |
| コンパイル時間 | 3,063 ms |
| コンパイル使用メモリ | 243,244 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-26 01:06:59 |
| 合計ジャッジ時間 | 3,920 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 20 |
ソースコード
#include <bits/stdc++.h>
// #include <x86intrin.h>
using namespace std;
using namespace numbers;
int main(){
cin.tie(0)->sync_with_stdio(0);
cin.exceptions(ios::badbit | ios::failbit);
long long n;
cin >> n;
for(auto i = 3; i <= 51; ++ i){
if(n == 1){
cout << "Yes " << i - 1 << "\n";
return 0;
}
if(n % 2 == 0){
n = n / 2;
}
else{
n = n * 3 + 1;
}
}
cout << "No\n";
return 0;
}
/*
*/
////////////////////////////////////////////////////////////////////////////////////////
// //
// Coded by Aeren //
// //
////////////////////////////////////////////////////////////////////////////////////////