Using System;
using System.Collections.Generic;
public class Matrix
{
private double[,] Data;
public double this[int i, int j]
{
get { return Data[i, j]; }
set { Data[i, j] = value; }
}
public Matrix(double[,] data) { this.Data = data; }
public override string ToString()
{
var sb = new System.Text.StringBuilder();
for (var i = Data.GetLowerBound(0); i <= Data.GetUpperBound(0); i++)
{
for (var j = Data.GetLowerBound(1); j <= Data.GetUpperBound(1); j++)
{
sb.AppendFormat("{0} ", Data[i, j]);
}
sb.AppendLine();
}
return sb.ToString();
}
public int GetUpperBound(int i) => this.Data.GetUpperBound(i);
public static Matrix operator -(Matrix a, Matrix b)
{
var c = new double[1 + Math.Min(a.GetUpperBound(0), b.GetUpperBound(0)), 1 + Math.Min(a.GetUpperBound(1), b.GetUpperBound(1))];
for (var i = 0; i <= c.GetUpperBound(0); i++)
{
for (var j = 0; j <= c.GetUpperBound(1); j++)
{
c[i, j] = a[i, j] - b[i, j];
}
};
return new Matrix(c);
}
}
class Program
{
static void Main()
{
var n = 5;
var a = new Matrix(new double[n, n]);
var b = new Matrix(new double[n, n]);
for (var i = 0; i < n; i++)
{
for (var j = 0; j < n; j++)
{
a[i, j] = i + j;
b[i, j] = i;
}
}
Console.WriteLine(a);
Console.WriteLine(b);
Console.WriteLine(a - b);
Console.ReadKey();
}
}
Using System;
public class Test
{
public static int Main()
{
double a=Convert.ToDouble(Console.ReadLine());
double c=Convert.ToDouble(Console.ReadLine());
double b=Math.Sqrt(c*c-a*a);
double r=(a+b-c)/2;
Console.WriteLine("Катет = "+Math.Round(b,2));
Console.WriteLine("r вписанной окр. = "+Math.Round(r,2));
return 0;
}
}
запишем условие: I1=447.6Kб, I2=1.8Мб N-?
решение: выразим объем дискеты в Кб
1,8*1024=1843,2 Кб
N=I2/I1=1842.2/447.6=4.1179 (округлим до 4) это и есть ответ
Var
x, y : real;
begin
read (x, y);
if sqr (x) + sqr (y) <= 4 then write ('YES') else write ('NO');
end.