Submission #68905008


Source Code Expand

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
#pragma warning disable CS8603, CS8604, CS8602


namespace ProblemB {
	class TEST {
		public static void Main() {
			Sol mySol = new Sol();
			mySol.Solve();
		}
	}

	class Sol {
		long f (long x){
			var s = x.ToString().ToCharArray();
			Array.Reverse(s);
			return long.Parse(new string(s));
		}
		public void Solve() {

			long x = X;
			long y = Y;
			long z = 0;
			for(int i=3;i<=10;i++){
				z = f(x + y);
				x = y;
				y = z;
			}
			Console.WriteLine(z);



		}
		long X, Y;
		public Sol() {
			var d = ria();
			X = d[0]; Y = d[1];
		}

		static String rs() { return Console.ReadLine(); }
		static int ri() { return int.Parse(Console.ReadLine()); }
		static long rl() { return long.Parse(Console.ReadLine()); }
		static double rd() { return double.Parse(Console.ReadLine()); }
		static String[] rsa(char sep = ' ') { return Console.ReadLine().Split(sep); }
		static int[] ria(char sep = ' ') { return Array.ConvertAll(Console.ReadLine().Split(sep), e => int.Parse(e)); }
		static long[] rla(char sep = ' ') { return Array.ConvertAll(Console.ReadLine().Split(sep), e => long.Parse(e)); }
		static double[] rda(char sep = ' ') { return Array.ConvertAll(Console.ReadLine().Split(sep), e => double.Parse(e)); }
		static T[] mka<T>(int n, T ini) { T[] ret = new T[n]; for (int i = 0; i < n; i++) ret[i] = ini; return ret; }
		static T[][] mka<T>(int n, int m, T ini) { T[][] ret = new T[n][]; for (int i = 0; i < n; i++) ret[i] = mka(m, ini); return ret; }
		static T[][][] mka<T>(int n, int m, int l, T ini) { T[][][] ret = new T[n][][]; for (int i = 0; i < n; i++) ret[i] = mka(m, l, ini); return ret; }
		static T[][][][] mka<T>(int n, int m, int l, int k, T ini) { T[][][][] ret = new T[n][][][]; for (int i = 0; i < n; i++) ret[i] = mka(m, l, k, ini); return ret; }
		static T[] mka<T>(int n) where T : new() { T[] ret = new T[n]; for (int i = 0; i < n; i++) ret[i] = new T(); return ret; }
		static T[][] mka<T>(int n, int m) where T : new() { T[][] ret = new T[n][]; for (int i = 0; i < n; i++) ret[i] = mka<T>(m); return ret; }
		static T[][][] mka<T>(int n, int m, int l) where T : new() { T[][][] ret = new T[n][][]; for (int i = 0; i < n; i++) ret[i] = mka<T>(m, l); return ret; }
		static T[][][][] mka<T>(int n, int m, int l, int k) where T : new() { T[][][][] ret = new T[n][][][]; for (int i = 0; i < n; i++) ret[i] = mka<T>(m, l, k); return ret; }

	}

}

Submission Info

Submission Time
Task B - Fibonacci Reversed
User kuuso
Language C# 11.0 (.NET 7.0.7)
Score 200
Code Size 2553 Byte
Status AC
Exec Time 46 ms
Memory 24920 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 35 ms 24676 KiB
00_sample_01.txt AC 42 ms 24516 KiB
00_sample_02.txt AC 42 ms 24772 KiB
01_random_00.txt AC 42 ms 24548 KiB
01_random_01.txt AC 39 ms 24452 KiB
01_random_02.txt AC 32 ms 24548 KiB
01_random_03.txt AC 46 ms 24472 KiB
01_random_04.txt AC 44 ms 24460 KiB
01_random_05.txt AC 42 ms 24920 KiB
01_random_06.txt AC 42 ms 24404 KiB
01_random_07.txt AC 46 ms 24548 KiB
02_handmade_00.txt AC 41 ms 24780 KiB
02_handmade_01.txt AC 37 ms 24468 KiB
02_handmade_02.txt AC 38 ms 24560 KiB
02_handmade_03.txt AC 38 ms 24768 KiB
02_handmade_04.txt AC 46 ms 24556 KiB