P2673 《瞿葩的数字游戏》T1-数字王国的门神
题目传送门
\mathcal{Description}
表示斐波那契数列的第
\mathcal{Solution}
推式子,在这个数前面加上 0.,转为小数,即。
最后是
时间复杂度
\mathcal{Code}
//
// Created by liliz on 2022/12/20.
//
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
freopen("test.in", "r", stdin);
freopen("test.out", "w", stdout);
int l, r, x = 10;
cin >> l >> r;
for (int i = 1; i <= r; i++) {
if (i >= l) cout << x * 10 / 89;
x = x * 10 % 89;
}
return 0;
}