MCPcopy Create free account
hub / github.com/E869120/math-algorithm-book / main

Function main

codes/cpp/Code_4_07_1.cpp:33–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33int main() {
34 // ���� �� �ݏ�̌v�Z�iN �� 2 �ȏ�łȂ���ΐ��������삵�Ȃ��̂Œ��Ӂj
35 long long N;
36 cin >> N;
37 Matrix A; A.p[0][0] = 1; A.p[0][1] = 1; A.p[1][0] = 1;
38 Matrix B = Power(A, N - 1);
39
40 // �o�́i������ 9 ���ڂ� 0 �̏ꍇ�A�ŏ��� 0 ���܂܂Ȃ��`�ŏo�͂��Ă��邱�Ƃɒ��Ӂj
41 cout << (B.p[1][0] + B.p[1][1]) % 1000000000 << endl;
42 return 0;
43}

Callers

nothing calls this directly

Calls 1

PowerFunction · 0.70

Tested by

no test coverage detected