codeforces 712 Memory and De-Evolution
程序员文章站
2022-03-22 11:42:18
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; }
上一篇: Ai简单绘制一个时钟图标
下一篇: php画图实例
推荐阅读