Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Numerics;
- namespace SequenceInMatrix
- {
- class Program
- {
- static void Main(string[] args)
- {
- BigInteger N = BigInteger.Parse(Console.ReadLine());
- BigInteger sum = 0;
- for (int row = 0; row < N; row++)
- {
- for (int col = row; col< N; col++)
- {
- if (col >= row)
- {
- sum += BigInteger.Pow(2, row + col);
- }
- }
- }
- Console.WriteLine(sum);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment