pjcode0's blog

By pjcode0, history, 21 month(s) ago, In English

Write a program to input gross amount of bill and calculate the net amount according to the below discounts:

If amount <= 1000, then discount is 0% If amount is from 1001 to 5000, then discount is 5% If amount is from 5001 to 10000, then discount is 10% If amount > 10000, then discount is 15% An additional discount of 2% if bill is greater than 30000.

input : 2500 output: 2375.00 can anyone help . i know it is a simple program but i am not getting it idk why i have tries net amount = gross_amount divided by 1.05 (if gross amount from 1001 to 5000) , similarly gross_amount divided by 1.07 if it is from 5001 to 10000, .... but it is giving wrong result.

Some other test cases:

input: 500 output: 500.0

input: 25000 output: 21250.0

input: 5500 output: 4950.0

input: 12000 output: 10200.0

input: 40000 output: 33200.0

Full text and comments »

  • Vote: I like it
  • -3
  • Vote: I do not like it

By pjcode0, history, 3 years ago, In English

Are there people here... who live in a country or a place which is undergoing a war...? I would like to hear your experience living there and what is the situation there? Please share in comments! By war-zones, I mean those areas of violence (maybe due to terrorism or political disturbance). We, competitive programmers are one of the most intelligent, knowledgeable and smartest people on the planet. Let's discuss how can we contribute to overcome these activities. In the past few decades millions of people died due to these activities (mainly from middle eastern countries like Syria, Iraq, etc.).

Full text and comments »

  • Vote: I like it
  • -23
  • Vote: I do not like it

By pjcode0, history, 3 years ago, In English

Someone please explain this problem: Problem link. Kindly explain in detail how to do the problem using two pointers with proof. Thanks.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By pjcode0, 3 years ago, In English

Hello Codeforces,

Hope everyone is doing well! Actually, in my college and peers, almost nobody is doing (or did) CP.. and that is the reason why I can't do beautiful discussions on problems and things like peer pressure and all those things don't happen with me... I think doing CP with peers is way more fun and way better than doing it alone (at least a discussion must be there).

If you're up, to do CP with me kindly comment down and if you agree, please upvote...

At start, our schedule might be:

Two Div2 contests daily (virtual or live).. and solving problems at least till C. Or We can also do like 3 contests daily and upsolving problems till C the next day (We can adjust the schedule accordingly).

Wish you everyone, more ratings and learning....

UPD: On public demand, I have created a whatsapp group for the same... Enjoy! Join Now

Full text and comments »

  • Vote: I like it
  • +14
  • Vote: I do not like it

By pjcode0, history, 3 years ago, In English

Hello Codeforces,

I've been wondering why most of the good Competitive Programmers are skinny... whether it is Errichto or tourist... and most of the other masters and grandmasters ...

What is your opinion? Comments are welcome..

Full text and comments »

  • Vote: I like it
  • -33
  • Vote: I do not like it

By pjcode0, history, 3 years ago, In English

Hello Codeforces,

Its been an year now since I am doing competitive programming. I practice daily, solve questions but still can’t solve Div2 Cs or problems with rating >=1400. Perhaps the reason is I try to prove everything, Never assume anything. But since I love it, even the easiest problems, I enjoy doing them..

Sometimes it feels lonely because cannot give enough time to family and friends as giving most of the times practicing virtual contests, thinking about solutions and all.. Currently, I am just solving Div2 contests and try problems only till C.. doing 2 contests daily and upsolving problems till C.. hope that perhaps in a few months.. will be able to figure out problems till C.. Maybe it happens with everyone... At last want to say that I will continue doing this with full motivation,, but will hope that I will get results.. Just wanted to share my story, giving all my time to codeforces.. that’s how much I love it.

Comments and suggestions are welcome .. Also want to ask if this is the right strategy or should I change it because I’m not getting results?

Full text and comments »

  • Vote: I like it
  • -28
  • Vote: I do not like it