杭电1021

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package oj;

import java.util.Scanner;

public class Main_1021 {

public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
while (scanner.hasNext()) {
int a=scanner.nextInt();
if (a%4==2) {
System.out.println("yes");
}else{
System.out.println("no");
}

}

}
public static int fun(int n){
if (n==0) {
return 7;
}else if (n==1) {
return 11;
}else {
return fun(n-1)+fun(n-2);
}
}

}

真没想到可以这样找规律的方式,参考
http://www.voidcn.com/blog/G7S9R/article/p-3766135.html