var a: integer;
var t: real;
begin
readln(a);
t:= (a div 10) * (a mod 10) / 2;
writeln(t)
end.
writeln((a div 10) - (a mod 10))
writeln((a div 1000), " килограмм ", (a mod 1000), " грамм")
writeln(a div 10000)
var a, b, c, d: integer;
d:= a div 38400;
a:= a mod 38400;
c:= a div 3840;
a:= a mod 3840;
b:= a div 96;
a:= a mod 96;
writeln(d, " берковцев ", c, " пудов ", b, " фунтов ", a, " золотников")
N = int(input())
Speed_limit_car_count = 0
all_speed = 0
car_speed = []
i = 0
total = None
YN = None
def list_check(car_speed):
for i in range(len(car_speed)):
if car_speed[i] in range(1, 300):
normal = True
continue
else:
normal = False
break
return normal
if N not in range(1, 31):
print('Wrong input')
while i < N:
car_speed.append(float(input()))
i += 1
normal = list_check(car_speed)
if normal:
if car_speed[i] <= 30:
Speed_limit_car_count += 1
round(car_speed[i])
all_speed += car_speed[i]
total = all_speed/N
if Speed_limit_car_count >= 2:
YN = 'YES'
YN = 'NO'
print('ERROR IN SPEEDLIST. CHEK INPUT!')
print(total, YN)
Программа протестирована. ctrl+c делать не стоит, сайт нарушает табуляции в коде.
var a: integer;
var t: real;
begin
readln(a);
t:= (a div 10) * (a mod 10) / 2;
writeln(t)
end.
var a: integer;
begin
readln(a);
writeln((a div 10) - (a mod 10))
end.
var a: integer;
begin
readln(a);
writeln((a div 1000), " килограмм ", (a mod 1000), " грамм")
end.
var a: integer;
begin
readln(a);
writeln(a div 10000)
end.
var a, b, c, d: integer;
begin
readln(a);
d:= a div 38400;
a:= a mod 38400;
c:= a div 3840;
a:= a mod 3840;
b:= a div 96;
a:= a mod 96;
writeln(d, " берковцев ", c, " пудов ", b, " фунтов ", a, " золотников")
end.
N = int(input())
Speed_limit_car_count = 0
all_speed = 0
car_speed = []
i = 0
total = None
YN = None
def list_check(car_speed):
for i in range(len(car_speed)):
if car_speed[i] in range(1, 300):
normal = True
continue
else:
normal = False
break
return normal
if N not in range(1, 31):
print('Wrong input')
else:
while i < N:
car_speed.append(float(input()))
i += 1
normal = list_check(car_speed)
if normal:
for i in range(len(car_speed)):
if car_speed[i] <= 30:
Speed_limit_car_count += 1
for i in range(len(car_speed)):
round(car_speed[i])
all_speed += car_speed[i]
total = all_speed/N
if Speed_limit_car_count >= 2:
YN = 'YES'
else:
YN = 'NO'
else:
print('ERROR IN SPEEDLIST. CHEK INPUT!')
print(total, YN)
Программа протестирована. ctrl+c делать не стоит, сайт нарушает табуляции в коде.