結果
| 問題 | No.2534 コラッツ数列 |
| コンテスト | |
| ユーザー |
hiro71687k
|
| 提出日時 | 2023-11-13 13:55:06 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 589 bytes |
| 記録 | |
| コンパイル時間 | 4,165 ms |
| コンパイル使用メモリ | 250,416 KB |
| 最終ジャッジ日時 | 2025-02-17 21:53:41 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 21 WA * 12 |
ソースコード
#include <bits/stdc++.h>
#include<atcoder/all>
using namespace atcoder;
using namespace std;
using ll=long long;
using ld=long double;
ld pie=3.141592653589793;
ll mod=998244353;
ll inf=30000000000000000;//10^17
int main(){
ll n;
cin >> n;
for (ll i = 0; i < 50; i++)
{
if (n==1)
{
cout << "Yes" << endl;
cout << (i+1)*2 << endl;
return 0;
}
if ((i+1)*2>=50)
{
cout << "No" << endl;
return 0;
}
if (n%2==0)
{
n/=2;
}
}
}
hiro71687k