refactor: define combined ContestID and Index to reduce declarations
This commit is contained in:
parent
5aa133b6af
commit
8f4d2cb946
1 changed files with 3 additions and 2 deletions
|
@ -75,8 +75,9 @@ func main() {
|
|||
|
||||
for _, p := range response.Result.Problems {
|
||||
for _, i := range files {
|
||||
if i == fmt.Sprintf("%v%v", p.ContestId, p.Index) {
|
||||
text := fmt.Sprintf("- [%v%v %v](https://codeforces.com/problemset/problem/%v/%v)", p.ContestId, p.Index, p.Name, p.ContestId, p.Index)
|
||||
combined := fmt.Sprintf("%v%v", p.ContestId, p.Index)
|
||||
if i == combined {
|
||||
text := fmt.Sprintf("- [%v %v](https://codeforces.com/problemset/problem/%v/%v)", combined, p.Name, p.ContestId, p.Index)
|
||||
solved = append(solved, text)
|
||||
continue
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue