Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- response1 = requests.get("https://codeforces.com/api/user.status?handle=erfanul007&from=1&count=2000")
- submission1 = response1.json()['result']
- user1 = dict()
- for val in submission1:
- if val['verdict'] == 'OK' and 'rating' in val['problem']:
- problemID = str(val['problem']['contestId']) + val['problem']['index']
- user1[problemID] = val['problem']['rating']
- # print(user1)
- response2 = requests.get("https://codeforces.com/api/user.status?handle=el.duivel&from=1&count=2000")
- submission2 = response2.json()['result']
- user2 = dict()
- for val in submission2:
- if val['verdict'] == 'OK' and 'rating' in val['problem']:
- problemID = str(val['problem']['contestId']) + val['problem']['index']
- user2[problemID] = val['problem']['rating']
- # print(user2)
- unqsub = list()
- for subs in user1:
- if subs not in user2 and user1[subs] >= 2000:
- unqsub.append(subs)
- print(unqsub)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement