1 条题解
-
0Infinity_ LV 8 @ 2024-06-09 13:15:41
#include<iostream> using namespace std; int main(){ ios::sync_with_stdio(false); int a, b, sum = 0; cin >> a >> b; while(a != b){ if(b % 2 == 0 && b / 2 >= a){ b /= 2; sum++; }else{ b--; sum++; } } cout << sum << endl; return 0; }
- 1
信息
- ID
- 2018
- 难度
- 9
- 分类
- (无)
- 标签
- 递交数
- 3
- 已通过
- 1
- 通过率
- 33%
- 被复制
- 3
- 上传者