Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Untitled

a guest Apr 5th, 2020 132 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4.  
  5. namespace Test
  6. {
  7.     public class Program
  8.     {
  9.         public static void Main()
  10.         {
  11.             int[] nums = Console.ReadLine().Split().Select(int.Parse).ToArray();
  12.            
  13.            
  14.               while(nums.Length > 1)
  15.               {
  16.                 int[] condensed = new int[nums.Length - 1];
  17.  
  18.                 for(int i = 0; i < nums.Length - 1; i ++)
  19.                 {
  20.                     condensed[i] = nums[i] + nums[i + 1];
  21.                 }
  22.            
  23.                 nums = condensed;
  24.  
  25.                
  26.               }
  27.  
  28.             Console.WriteLine(string.Join(" ", nums));
  29.  
  30.  
  31.         }
  32.  
  33.     }
  34. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top