MCPcopy Create free account
hub / github.com/acm-clan/algorithm-stone / check_problem

Method check_problem

src/codeforces.py:116–127  ·  view source on GitHub ↗
(self, id, cid, index)

Source from the content-addressed store, hash-verified

114 return probleams
115
116 def check_problem(self, id, cid, index):
117 if self.get_db_problem(id, False) != None:
118 return
119 url = "https://codeforces.com/problemset/problem/%s/%s" % (cid, index)
120
121 try:
122 f = urllib.request.urlopen(url)
123 content = f.read().decode('utf-8')
124 self.save_db_problem(id, content)
125 except Exception as e:
126 print("check problem error:", e)
127 pass
128
129 def get_update_db_time(self):
130 t = self.dict.get("codeforce_update_db_time")

Callers

nothing calls this directly

Calls 3

get_db_problemMethod · 0.95
save_db_problemMethod · 0.95
printFunction · 0.85

Tested by

no test coverage detected