I was solving some easy problems here ( div2.A/B ) and then I came across this problem which requires nothing but just straightforward implementation. But then I was confused to see the difficulty rating (a recently added feature) for this problem. Is it some kind of bug ?

Correct me if I'm wrong. Difficulty rating is calculated according to the people who solved the problem during the contest. Since this is a quite old contest, a lot of participants are now Candidate Masters or higher when the difficulty rating was introduced. That explains why the difficulty rating is that high.

In the blog which MikeMirzayanov introduced this helpful scale, he commented that the difficulty rating was computed based on the contestant rating during the contest.

P.S. The history of the Contest Rating for every contestant as a function of time since registration is available in the profile information.

In various places, I've also noticed difficulty ratings be seemingly buggy. Either it's a div2 contest with all ratings > 1800, or within a round where a problem with much less solves gets a lower rating than a problem with only one or two solves.

Basically, I suspect there are a couple of bugs in the rating calculation.

Edit: I thought I should give an example. Take a look at contests 26-28. https://codeforces.com/problemset/page/47. Even more specific example, take a look at https://codeforces.com/problemset/problem/26/A with rating 2400. Nothing weird happened during this contest, and 480 out of 500 of the contestants solved it. It's pretty obviously not correct.

RE:Div 2 contest with all its problems having difficulty ratings > 1800Perhaps a staircase-wise

upper-boundsuch as the following is sufficient to regulate the problem difficulties within the same contest:RE:a problem with much less "present" accepted solutions has lower difficulty ratingThe reason for this discrepancy appears to be that the difficulty rating is a static number that is not updated dynamically when more solutions are accepted during the practice phase.

P.S. The example threshold levels were updated based on the histogram data.

I have just reviewed the present histogram of the difficulty ratings using the filtering feature. The present 4721 problems in the problem set can be clustered into the following 12 groups with respect to their associated difficulty ratings.

It should make sense that problems of future contests belong to the aforementioned groups as follows.