0 || n == 1) { return n; } else if (fibdp[n] != 0) { return fibdp[n]; } else { fibdp[n] = fib(n-2) + fib(n-1); return fibdp[n]; } } int main() { for (int i = 0; i < 100; i++) fibdp[i] = 0; int ans = fib(46); printf("%d¥n", ans); return 0; } int prime(int n) { if (n % 2 == 0) return 0; int k = 3; while (k * k <= n) { if (n % k == 0) return 0; k = k + 2; } return 1; } int main() { int i = 2; while (i < 10000) { if (prime(i)) printf("prime!: %d¥n", i); i++; } return 0; }