//pascalabc.net 3.1 сборка 1200 uses system; begin var replace4to16 : = new dictionary< string, string> (); replace4to16.add('00', '0'); replace4to16.add('01', '1'); replace4to16.add('02', '2'); replace4to16.add('03', '3'); replace4to16.add('10', '4'); replace4to16.add('11', '5'); replace4to16.add('12', '6'); replace4to16.add('13', '7'); replace4to16.add('20', '8'); replace4to16.add('21', '9'); replace4to16.add('22', 'a'); replace4to16.add('23', 'b'); replace4to16.add('30', 'c'); replace4to16.add('31', 'd'); replace4to16.add('32', 'e'); replace4to16.add('33', 'f'); var n4 : = readstring('a_4 = '); if n4.length mod 2 = 1 then n4 : = '0' + n4; var n16 : = ''; for var i : = 0 to n4.length div 2 - 1 do if replace4to16.containskey(n4.substring(2 * i, 2)) then n16 += replace4to16[n4.substring(2 * i, 2)] else writeln('неверные знаки "', n4.substring(2 * i, 2), '" в числе'); writeln(n16); end.
ur101679
30.06.2022
## код на ruby 2.2.3p173 r = [] file.open("b.in", "r") do |infile| while (line = infile.gets) line.split(",").each {|t| r< < t.to_f} end p r end file.open("b.out", "w") do |file| p r[0] > = r[1] + r[2] if r[0] > = r[1] + r[2] file.puts "yes" else file.puts "no" end end