結果
| 問題 | No.642 Two Operations No.1 |
| コンテスト | |
| ユーザー |
🍮かんプリン
|
| 提出日時 | 2019-03-18 09:26:38 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| + 204µs | |
| コード長 | 390 bytes |
| 記録 | |
| コンパイル時間 | 330 ms |
| コンパイル使用メモリ | 88,808 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-08-16 00:46:08 |
| 合計ジャッジ時間 | 1,532 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 15 |
ソースコード
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <math.h>
using ll = long long;
using namespace std;
const int MOD = 1e9+7;
int main() {
int n, cnt = 0;
cin >> n;
while(n != 1) {
if (n % 2 == 0) {
n /= 2;
}
else {
n++;
}
cnt++;
}
cout << cnt << endl;
return 0;
}
🍮かんプリン