function unsin(t:real):real; var l,r,ans,mid:longint; function dsin(z:real):real; begin exit(sin(z*pi/180)); end; begin l:=0; r:=900000000; ans:=0; while l<=r do begin mid:=(l+r) div 2; if dsin(mid/1e7)>t then r:=mid-1 else begin l:=mid+1; ans:=mid; end; end; exit(ans/1e7); end;
主要是二分的思想,1e7控制精度
(其实根本原因是arcsin不会用,无奈下写了二分)