回答編集履歴
2
インデント修正
test
CHANGED
@@ -38,7 +38,7 @@
|
|
38
38
|
|
39
39
|
if year%4 == 0
|
40
40
|
|
41
|
-
return true
|
41
|
+
return true
|
42
42
|
|
43
43
|
end
|
44
44
|
|
1
修正例の追記
test
CHANGED
@@ -13,3 +13,41 @@
|
|
13
13
|
Q3. 2001年を引数にした場合の結果は何ですか?
|
14
14
|
|
15
15
|
(漏れがある)
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
```Ruby
|
20
|
+
|
21
|
+
def isLeapYear(year)
|
22
|
+
|
23
|
+
if year%400 == 0
|
24
|
+
|
25
|
+
return true
|
26
|
+
|
27
|
+
end
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
if year%100 == 0
|
32
|
+
|
33
|
+
return false
|
34
|
+
|
35
|
+
end
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
if year%4 == 0
|
40
|
+
|
41
|
+
return true
|
42
|
+
|
43
|
+
end
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
return false
|
48
|
+
|
49
|
+
end
|
50
|
+
|
51
|
+
```
|
52
|
+
|
53
|
+
|