Using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks;
namespace pzn {
class Program { public static void Main(string[] args) { int x = Convert.ToInt32(Console.ReadLine()); int y = Convert.ToInt32(Console.ReadLine()); int temp; if (x<y) { x ^= y; y ^= x; x ^= y; } Console.WriteLine("x={0}, y={1}", x, y); Console.ReadKey(); } } }
// PascalABC.NET 3.3, сборка 1540 от 16.09.2017 // Внимание! Если программа не работает, обновите версию!
begin var n,p:integer; var s:string; for var a:=1 to 9 do for var b:=0 to 9 do for var c:=0 to 9 do begin n:=100*a+10*b+c; s:=(n*n).ToString.Right(3); p:=Pos(a.ToString,s); if p>0 then begin Delete(s,p,1); p:=Pos(b.ToString,s); if p>0 then begin Delete(s,p,1); if s=c.ToString then Write(n,'(',n*n,')',' ') end end end end.
Результат 205(42025) 376(141376) 421(177241) 625(390625) 963(927369)
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace pzn
{
class Program
{
public static void Main(string[] args)
{
int x = Convert.ToInt32(Console.ReadLine());
int y = Convert.ToInt32(Console.ReadLine());
int temp;
if (x<y)
{
x ^= y;
y ^= x;
x ^= y;
}
Console.WriteLine("x={0}, y={1}", x, y);
Console.ReadKey();
}
}
}