//Pascal ABC.NET 3.1 сборка 1256
Var
s:string;
a,b:real;
begin
readln(s);
a:=strtofloat(copy(s,1,pos('X',s)-1));
b:=strtofloat(copy(s,pos('=',s)+1,length(s)-pos('=',s)));
if (a=0) and (b=0) then
begin
writeln('X-любое действительное число');
exit;
end
else
if a=0 then
begin
writeln('Нет корней');
exit;
end;
writeln(b/a);
end.
Пример ввода:
-0.1X=10
Пример вывода:
-100
#include <cmath>
#include <iostream>
int perevod(bool a, int minutes)
{
if (a)
{
return floor(static_cast<float>(minutes) / 60);
}
else
{
return minutes % 60;
}
}
int main()
{
int hours, hours1, hours2;
int minutes, minutes1, minutes2;
std::cin >> hours >> minutes;
std::cin >> hours1 >> minutes1;
std::cin >> hours2 >> minutes2;
int temp = minutes + minutes1 + minutes2;
minutes = perevod(0, temp);
hours += perevod(1, temp) + hours1 + hours2;
std::cout << hours << " " << minutes;
return 0;
}
// Mingw
var a: array [1..6] of integer;
var I: integer;
begin
a[1]:=5;
for I:=2 to 6 do a[I]:=a[I-1]*a[I-1];
writeln(a[I]);
end.
Ответ -4223
7FE=14*16^0+15*16^1+7*16^2=2046 в 10 с/с 2046/2=1023 байт
E=14
F=15
Ответ 2