Submission #68924542


Source Code Expand

#include<bits/stdc++.h>
#define ll long long

using namespace std;

int main(){

  auto rev = [&](ll x) -> ll {
    string s = to_string(x);
    reverse(s.begin(),s.end());
    return stoll(s);
  };

  ll f[11]{};
  cin >> f[1] >> f[2];
  for(int i = 3; i <= 10; i++){
    f[i] = rev(f[i-1] + f[i-2]);
  }

  cout << f[10];

 return 0;
}

Submission Info

Submission Time
Task B - Fibonacci Reversed
User JyuK_SIR
Language C++ 20 (gcc 12.2)
Score 200
Code Size 359 Byte
Status AC
Exec Time 1 ms
Memory 3668 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 16
Set Name Test Cases
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 02_handmade_00.txt, 02_handmade_01.txt, 02_handmade_02.txt, 02_handmade_03.txt, 02_handmade_04.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 1 ms 3620 KiB
00_sample_01.txt AC 1 ms 3616 KiB
00_sample_02.txt AC 1 ms 3472 KiB
01_random_00.txt AC 1 ms 3544 KiB
01_random_01.txt AC 1 ms 3436 KiB
01_random_02.txt AC 1 ms 3436 KiB
01_random_03.txt AC 1 ms 3528 KiB
01_random_04.txt AC 1 ms 3616 KiB
01_random_05.txt AC 1 ms 3668 KiB
01_random_06.txt AC 1 ms 3468 KiB
01_random_07.txt AC 1 ms 3492 KiB
02_handmade_00.txt AC 1 ms 3484 KiB
02_handmade_01.txt AC 1 ms 3468 KiB
02_handmade_02.txt AC 1 ms 3484 KiB
02_handmade_03.txt AC 1 ms 3620 KiB
02_handmade_04.txt AC 1 ms 3612 KiB