program P1093;var n:integer;s:longint;function a(n:integer):integer;beginif n=1 then exit(1);if n=2 then exit(2);exit(a(n-1));end;beginread(n);s:=a(n);s:=s mod 7654321;write(s);end.另外,如果是因为结果太大而要求输出结果MOD 7654321的话,可能会出现函数递归爆栈或计算过程中超范围的情况。
据 free pascal 官方介绍, 他们支援的平台只有 Linux, FreeBSD, Haiku, Mac OS X/iOS/Darwin, DOS, Win32, Win64, WinCE, OS/2, MorphOS, Nintendo GBA, Nintendo DS, and Nintendo Wii如果你是 WinCE 还有机会, 其他的应该不行吧您好,手机上使用free pascal不太现实,因为比较大。您可以使用turbo pascal。具体方法如下。在手机上安装dosbox,这个教程网上很多,支持android symbain,iOS不知道。再从dosbox中运行turbo pascal。用如果在android上,您可以尝试安装free pascal的DOS版本。如果您还有有问题请追问。var s:real; i:integer; begin for i:=1 to 100 do s:=s+1/i; writeln(s); end.