codeforces 712 Memory and De-Evolution
程序员文章站
2022-06-19 18:26:09
2019-05-19 13:25:37 加油,加油,坚持,坚持!!! 一定要逆推,才可以是最少的次数 更好的方法: https://www.cnblogs.com/ECJTUACM-873284962/p/6379014.html ......
2019-05-19
13:25:37
加油,加油,坚持,坚持!!!
一定要逆推,才可以是最少的次数
更好的方法:
https://www.cnblogs.com/ecjtuacm-873284962/p/6379014.html
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll x, y; scanf("%lld %lld", &x, &y); ll maxx = y; ll midd = y; ll minn = y; ll p = 0; ll q = 0; ll count = 0; while(1) { p = maxx; q = midd; maxx = midd + maxx - 1; midd = p; minn = q; count++; if (maxx >= x) { cout << count + 2 << endl; return 0; } } return 0; }
上一篇: Linux架设DNS服务器(二)
下一篇: Linux下执行java程序的方法
推荐阅读