Open utterances-bot opened 1 year ago
var n,i,t,tg,j:byte;
s,a:string;
min:real;
begin
readln(n); s:='ABCDEFGHIJKLMNOPQRSTUVWXYZ '; s:=s+'''';
for j:=1 to n do
begin
readln(a); upcase(a);
min:=0;
for i:=2 to length(a) do
begin
tg:=abs(pos(a[i],s)-pos(a[i-1],s));
if tg=0 then min:=min+1 else
begin
if tg<=28-tg then t:=tg else t:=28-tg;
min:=min+(((60pi)/28)t)/15+1;
end;
end;
writeln(min+1:0:4);
end;
end.
đây là code pascal đã ac
Thuyền trưởng Roxana - Luyện Code Online
https://oj.luyencode.net/problem/INSPIRE