Код:
using System;
namespace WordsCounter
{
class Bishop
{
private int x, y;
public Bishop(int x, int y)
{
this.x = x;
this.y = y;
}
public bool CanIAttackIt(int x, int y)
{
return Math.Abs(x - y) == Math.Abs(this.x - this.y);
}
}
class Program
{
static void Main(string[] args)
{
var x0 = int.Parse(Console.ReadLine()!);
var y0 = int.Parse(Console.ReadLine()!);
var x = int.Parse(Console.ReadLine()!);
var y = int.Parse(Console.ReadLine()!);
Console.WriteLine((new Bishop(x0, y0)).CanIAttackIt(x, y));
}
}
}
акура=01320=0*4^4+1*4^3+3*4^2+2*4^1+0*4^0=64+3*16+2*4=64+48+8=120
карау=10203=256+2*16+3=256+32+3=291
рукаа=23100=2*256+3*64+32=512+192+32=736
укара=31020=3*256+64+2*4=768+64+8=836
урака=32010=3*256+2*64+4=832