OpenGenus / cosmos

World's largest Contributor driven code dataset | Used in Quark Search Engine, @OpenGenus IQ, OpenGenus Visual Project
http://internship.opengenus.org
GNU General Public License v3.0
13.56k stars 3.67k forks source link

CODECHEF Flipping Coins (FLIPCOIN) in C, JAVA and Python #5079

Open ka1shi opened 4 years ago

ka1shi commented 4 years ago

This is a(n):

Details: There are N coins kept on the table, numbered from 0 to N - 1. Initially, each coin is kept tails up. You have to perform two types of operations:

1) Flip all coins numbered between A and B inclusive. This is represented by the command "0 A B"

2) Answer how many coins numbered between A and B inclusive are heads up. This is represented by the command "1 A B".

ka1shi commented 4 years ago

Kindly assign it to me to work on all three languages. Thank You!