直接套斐波那契通项公式应该不要紧吧QWQ
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
using namespace std;
typedef long long ll;
const ll MOD = 1e8;
ll n, m, x, c, ans;
int main()
{
scanf("%lld%lld", &n, &m);
x = __gcd(n, m);
c = 1 / sqrt(5) * (pow((1 + sqrt(5)) / 2, x) - pow((1 - sqrt(5)) / 2, x));
ans = c % MOD;
printf("%lld", ans);
return 0;
}