2、1<=n<=1,000,000。参考代码:c++1.#include 2.#include 3.#define MOD 100074.#define MAXN 10000015.int n, i, F[MAXN];6.int main()7.{8. scanf("%d", &n);9. F[1] = 1;10. F[2] = 1;11. for (i = 3; i <= n; ++i)12. F[i] = (F[i-1] + F[i-2]) % MOD;13. printf("%d
3、", F[n]);14. return 0;15.}java:1.import java.util.Scanner;2.public class Main{3. public static void main(String[] args) {4. Scanner scanner = new Scanner(System.in) ;5. int num = scanner.nextInt() ;6. int[] a = new int[num+2] ;7. a[1] = a[2] = 1;8.
4、 if (num == 1) {9. a[num] = 1 ;10. }else if (num == 2) {11. a[num] = 1 ;12. }else {13. for (int i = 3; i <= num; i++) {14. a[i] = (a[i - 1] + a[i - 2]) % 10007 ;15. }16. }17. System.out.println(a[
6、,请注意π的值应该取较精确的值。你可以使用常量来表示π,比如PI=3.14159265358979323,也可以使用数学公式来求π,比如PI=atan(1.0)*4。c++1.#include 2.#include 3.int main()4.{5. int r;6. double s, PI;7. scanf("%d", &r);8. PI = atan(1.0) * 4;9. s = PI * r * r;10. printf("%.7lf", s);11. return 0;12.}j
7、ava:1.import java.util.Scanner;2.public class Main{3. private static final double PI = 3.14159265358979323;4. public static void main(String[] args) {5. int r = new Scanner(System.in).nextInt();6. if(1 <= r && r <= 10000) { 7. double circular = PI*r*