Repository: kmyk/online-judge-tools (python)

Issue:
AtCoderContest.get_penalty() fails if it has a singular form, "1 minute"
``` python
$ python3 -c 'from onlinejudge.service.atcoder import * ; AtCoderContest.from_url("https://atcoder.jp/contests/chokudai_S002").get_name()'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/user/GitHub/online-judge-tools/onlinejudge/service/atcoder.py", line 261, in get_name
    self._load_details(lang='en', session=session)
  File "/home/user/GitHub/online-judge-tools/onlinejudge/service/atcoder.py", line 255, in _load_details
    assert m
AssertionError
```

Pull request description:
#444: fix a bug of AtCoderContest.get_penalty()
close #444

ペナルティの表記に `minute` の形があることを見落としていていました。これを修正します。

Patch:
diff --git a/onlinejudge/service/atcoder.py b/onlinejudge/service/atcoder.py
index dc5e473..e5b58d3 100644
--- a/onlinejudge/service/atcoder.py
+++ b/onlinejudge/service/atcoder.py
@@ -251,7 +251,7 @@ class AtCoderContest(object):
         _, _, self._can_participate = soup.find('span', text=re.compile(r'^(Can Participate|参加対象): ')).text.partition(': ')
         _, _, self._rated_range = soup.find('span', text=re.compile(r'^(Rated Range|Rated対象): ')).text.partition(': ')
         penalty_text = soup.find('span', text=re.compile(r'^(Penalty|ペナルティ): ')).text
-        m = re.match(r'(Penalty|ペナルティ): (\d+)( minutes|分)', penalty_text)
+        m = re.match(r'(Penalty|ペナルティ): (\d+)( minutes?|分)', penalty_text)
         assert m
         self._penalty = datetime.timedelta(minutes=int(m.group(2)))
 


Test patch:
diff --git a/tests/service_atcoder.py b/tests/service_atcoder.py
index cb8c00b..7bc6063 100644
--- a/tests/service_atcoder.py
+++ b/tests/service_atcoder.py
@@ -59,6 +59,10 @@ class AtCoderContestTest(unittest.TestCase):
         self.assertEqual(contest.get_rated_range(), '-')
         self.assertEqual(contest.get_penalty().total_seconds(), 5 * 60)
 
+    def test_get_penalty_a_singular_form(self):
+        contest = AtCoderContest.from_url('https://atcoder.jp/contests/chokudai_S002')
+        self.assertEqual(contest.get_penalty().total_seconds(), 60)  # Penalty is written as "1 minute", not  "1 minutes"
+
     def test_list_problems(self):
         contest = AtCoderContest.from_url('https://atcoder.jp/contests/agc028')
         problems = contest.list_problems()