stoyanmkd

TicTacToe

Dec 19th, 2014
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.42 KB | None | 0 0
  1. using System;
  2. using System.Numerics;
  3.  
  4. class TicTacToe
  5. {
  6.     static void Main()
  7.     {
  8.         int x = int.Parse(Console.ReadLine());
  9.         int y = int.Parse(Console.ReadLine());
  10.         int v = int.Parse(Console.ReadLine());
  11.  
  12.         int index = y*3 + x + 1;
  13.  
  14.      
  15.  
  16.         int valueC = v + index - 1;
  17.  
  18.         long result = (long)Math.Pow(valueC, index);
  19.  
  20.         Console.WriteLine(result);
  21.  
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment