CodeChef is a non-commercial competitive programming community
Login
Username (New User? Signup) Password (Forgot Password?)
Signup
Login or
Signup with
Connect
Note
  • Publicize your achievements on your Facebook Wall.
  • Challenge your friends or ask them for help.

Site Navigation

  • PRACTICE
    • Easy
    • Medium
    • Hard
    • Challenge
    • Peer
  • COMPETE
    • February CookOff
    • February Long Contest
    • January CookOff
  • DISCUSS
    • Wiki
    • Forums
    • Blog
    • Twitter
  • COMMUNITY
    • CodeChef Meetups
    • Campus Chapters
    • Host your Contest
    • User Groups
    • CodeChef TechTalks
    • All Educational Initiatives
    • Event Calendar
  • HELP
    • Frequently Asked Questions
    • FAQ for problem setters
    • Problem Setting
    • Ranks
    • Tutorials
  • ABOUT
    • About CodeChef
    • Team CodeChef
    • Press Room
    • CodeChef Financials
    • CodeChef Sponsorships
    • CEO's Corner
    • Contact Us
    • About Directi
Home » Practice(extcontest)
Try your hand at one of the practice
         problems, and submit your solution in the language of your choice
         (our judge accepts solutions in over 35+ languages). Receive points,
         and move up through the CodeChef ranks. Get better, and better prepare
         yourself for the competitions
  • Easy
  • Medium
  • Hard
  • Challenge
  • Peer
Name Code Successful Submissions Accuracy
Problem 1 CMB01 739 39.39
Palindrome DPC206 628 48.73
Modulo NSIT13 393 41.7
Problem 2 CMB02 348 54.57
Anagram TECH04 334 28.58
Problem 3 CMB03 268 44.9
Carry DPC101 216 31.82
Riled ARAN01 168 49.62
Hardware Store CRAFT05 159 59.48
Fibonacci DPC204 146 42.04
Programmer Jackpot CREDE2 139 67.44
Numbers, Numbers, Numbers MANIP2 101 50.88
Problem 4 CME04 94 60.12
Not that Digit NSIT15 94 46.43
Square TECH07 80 29.26
I Spy You CD202 78 40.87
Reinfected ARAN03 70 79.38
Windows DPC107 69 54.86
Triangles AD2 64 75.45
Fact-o-real AXR1P2 63 34.01
Rumble ARAN07 63 54.69
Windows DPC207 61 75.56
Jump it up CD101 57 63.55
StringCode RGPVR101 53 40.37
On The Floor ENCODE01 48 62.04
Calendar CLNDR 47 29.17
Decreasing Strings TECH09 43 42.62
Cricket RGPVR102 43 67.12
Roman Numerals CS05 42 72.97
Sky is the Limit KC03 37 39.85
Clean the Forum Posts CLNFORUM 37 34.65
Consecutive Numbers RUBIX4 35 44.35
MineSweeper DPC103 33 29.05
Teachers Aide KC01 32 16
Maximum Difference Sum MAXSUM 31 25.66
Transformers AXR3P3 31 68.75
RectangleArea RGPVR103 30 50.68
Developer or Tester ENCODE04 28 37.61
Book Pages CSEA2 28 36.78
A Simple Equation TECH08 25 24
Spiral Numbers SPRLNMS 23 63.64
Arithmancy ARTHMNCY 23 28.97
Collinear Points CB04 22 26.56
Best Rectangle ENCD06 20 20.87
Paper Cube DPC104 19 66.67
Childs Play DPC210 19 54.17
Round and Round we Go MANIP3 17 20.69
Balanced Primes BALPRIME 17 54.35
How Many Triangles CB02 15 21.69
Divisor Sum ALK1105 15 32.26
Counting Stars COUNTSTR 15 82.61
Nails TECH06 15 35.71
Grid TECH05 14 24.32
Rational Numbers TQ2 13 42.5
CricInfo CRICINFO 13 30.95
Flibonakki AVISKR02 13 11.67
Alphabets DPC203 12 20.9
The Fianchettoed Piece AXR1P3 11 22.64
Celebrities of Pretendia IOPC1214 11 34.69
MOUNTAIN WALKING QCJ5 10 61.9
Gray Codes GRAYCODE 9 45.16
Destroy the Enemy CRAFT02 9 32.26
Greedy Government GREEDY 9 52.38
A Negative Base Problem ENCD05 9 23.53
Disc Stack AXR2P2 9 34.48
BOB Gaming KC201 9 21.74
Lucky Numbers Again RUBIX5 9 25
Numbers DPC102 9 69.23
Interesting List ENCD03 8 47.06
nCr as a Service NCRAAS 8 34.48
Frequent Prime Ranges TECH12 8 33.33
Max pow LMDP1103 8 26.09
Game ALK1104 8 75
Recon ARAN05 7 68.42
Temple Queues TEMPQUE 7 30.23
References DPC106 7 80
Spreadsheet scrolling IOPC1101 7 23.26
Array DPC209 7 50
Head over meals CD104 7 38.1
Binomial Coefficient CB01 7 12.28
Crazy texting IOPC1203 6 15.79
Maximum Profit BTCODE_D 6 40
Mr and Mrs Ant MMANT 6 18.52
Hostel LAN Connection ENCD11 6 25
Traversing Grid BTCODE_A 6 21.43
Revise Your Geometry MANIP4 6 38.46
Romeo and Juliet TOGETHER 6 19.35
Chocolate distribution IOPC1102 6 13.95
House ALG07 6 27.27
The Number Game CREDE4 6 35
Ice-Cream Mania ENCODE02 5 40.74
What is your IP DSPCXI01 5 7.79
Triangles ENCD09 5 27.78
Welcome to Conscientia TGPA01 5 50
Shoppers AVISKR05 5 28
Protecting Sheep PRTCTSHP 5 20.83
Board TECH13 5 66.67
The Grid CREDE3 5 35.71
THE GAME QCJ6 5 41.67
Magic is in the air CD103 4 40
Colouring graphs IOPC1213 4 85.71
Politics DPC205 4 85.71
A Numbers Game ICODER1 4 17.39
Darshits Dilemma ARDD 4 62.5
An unfortunate incident IOPC1210 4 36
CRC CS02 4 42.86
Tourist DPC208 4 100
The Legend Lives On! KC204 4 6.59
Multiplying by Rotation CS08 4 100
Cards ALG01 4 35.71
LCM GCD Love AVISKR01 4 5.56
Coloring Trees BTCODE_G 4 66.67
Candies and Milestones MILESTN 4 13.33
Twin Primes TGPA02 3 5.77
Gathering of the Great KC202 3 25
Trie Expectation BTCODE_H 3 42.86
Favorite Sub Hair FAVSUBS 3 25
Palindromic Subsequences CB03 3 50
AppleTrees DPC201 3 85.71
Road trip IOPC1110 3 60
A function over factors IOPC1204 3 13.33
Tree Sum TRSUM 3 27.27
Prime Challenge ENCODE05 3 23.08
Gimmicks of the Great RG206 3 50
Bio-HRQ-Comparator DPC202 3 80
HTML Tags TECH10 3 5.45
Corruption again IOPC1216 3 75
Icarus GO ICGO 3 50
Snaky Numbers SNAKENUM 3 60
Permutations TECH14 3 23.08
Rubiks cube IOPC1201 3 100
Ski slopes IOPC1113 3 60
Sum3 ENCODE13 3 28.57
Quadrilaterals IOPC1202 3 33.33
Notebook CSEA4 2 66.67
Place-name game IOPC1114 2 28.57
Virus ENCODE11 2 40
Building Towers NSIT11 2 66.67
BOXES QCJ1 2 25
The Next Prime AD1 2 5.06
Building Ports AVISKR03 2 11.76
Can You Multiply DSPCXI02 2 50
The Route A001 2 50
Party ALK1102 2 100
Military patrol IOPC1105 2 22.22
No to corruption IOPC1215 2 42.86
The Octopus CD106 2 40
The Templar Test KC205 2 25
Triangle Revisited AD4 2 28.57
Traffic Control CRAFT03 2 33.33
Alien Pandemia ALNPD 2 100
Life Game BTCODE_F 2 57.14
Hardware upgrade IOPC1200 2 33.33
Mobius Multiplications ENCODE07 2 75
SUM LMDP1104 2 17.65
The numbers game IOPC1211 2 66.67
Octagon Jumps CB05 2 38.46
STRINGENT STRINGS AD3 2 40
Sister cities IOPC1112 2 37.5
Crazy Miner CRZMNR 2 20
Painting PAINT 2 18.52
Progressive progressions IOPC1108 2 66.67
Gastric Groan RG204 1 16.67
Build the ladder ENCD08 1 50
IOPC transformation IOPC1208 1 100
Ordering Soldiers ALK1101 1 100
GROUPS INS0902 1 16.67
Triangle equality IOPC1104 1 33.33
Goofy Identity RG205 1 12.5
Caught Red Handed CREDF2 1 100
Chess game LMDP1102 1 16.67
Enumeration again IOPC1209 1 100
Slow Growing Bacteria AVISKR04 1 5.88
Permutation Game BTCODE_I 1 20
Min - Max 01 Path PATH01 1 16.67
We live to connect KC02 1 33.33
Removal ARAN06 1 100
rnumber TECH02 1 4.17
Seating Arrangements RUBIX2 1 20
Farhans Football ARFF 1 100
T-shirts ALG05 1 50
Checkmate CREDF3 1 50
A Palindromic Game ENCODE09 1 33.33
Grim Numbers RG201 1 25
COOKIES QCJ3 1 15.79
Grid Tiling BTCODE_J 1 50
Selecting DreamSpark Volunteers DSPCXI05 1 25
Aqualoo Plants ICODER3 1 2.04
Gears of War RG207 1 25
Primal Instincts RUBIX3 1 100
Cutting Rods ALG06 1 25
Gollums Pursuit RG202 1 18.18
An extraordinary Physics Test KC04 1 1.54
Word Grid DPC105 1 25
The Key A002 1 16.67
Revenge ARAN08 1 100
Giddy Aftermath RG208 1 50
Finding Minimum BTCODE_B 1 50
Jumping Game ENCODE06 1 12.5
Grime and Slime RG203 1 50
Utopia strikes back IOPC1212 1 4.35
Rooks on a Chessboard CB06 1 50
Square It Up AD5 1 100
The MSTC Team DSPCXI04 1 50
We fight for INSAF KC05 1 2.63
GM plants IOPC1207 1 7.69
Array Sorting BTCODE_K 1 3.23
The Mother-ship A003 1 100
Truly magical numbers IOPC1103 0 0
Fun With Inequalities BTCODE_C 0 0
Cold-Drink ALG08 0 0
Recover ARAN04 0 0
The Game Of Stacks CB07 0 0
FIND HYPOTENUSE QCJ4 0 0
MacroCrack PGM1 0 0
Race ALG03 0 0
Beat The Flu CREDF1 0 0
The Wish of the Grandmaster KC06 0 0
Search engine LMDP1101 0 0
Gomti the Cow SALG02 0 0
Getting Rid of the Holidays (Act I) HOLIDAY1 0 0
Spiral Chess SC 0 0
Move the books IOPC1109 0 0
Pizza Trouble MANIP6 0 0
Voice Processing Module AXR2P4 0 0
The Battle A004 0 0
Maintaining Roads TECH11 0 0
Problem 1 CME01 0 0
Nesting a Bunch of Brackets CS09 0 0
Hit The Target CRAFT01 0 0
Modular Enigma MDLREN 0 0
Help Tommy MANIP1 0 0
Artifacts ALG09 0 0
Speeds TQ3 0 0
Optimal Scheduling RUBIX1 0 0
BreakTime PGM2 0 0
Enumeration of rationals IOPC1115 0 0
Particles ALG04 0 0
Before Kurukshetra ENCODE10 0 0
The Discovery of the Millenium KC07 0 0
Thou Last , Thou Loseth KC203 0 0
Shortest Path Problem ENCD04 0 0
Help Munna SALG03 0 0
ROAD BOMBING QCJ2 0 0
Cipher CS06 0 0
Veenus on Adventure Trip ADVTRIP 0 0
A question of weight CREDE1 0 0
Agua Escasez AXR3P1 0 0
WEIGHTS INS0903 0 0
Problem 2 CME02 0 0
Anagram CS01 0 0
Fusing Particles ICODER2 0 0
Recover Polynomials BTCODE_E 0 0
Word Metamorphism AXR1P4 0 0
Patterns and Sequences ENCD10 0 0
Fight TGPA03 0 0
FunctionTrouble PGM3 0 0
Counting the teams IOPC1116 0 0
Combination Generator SALG04 0 0
Dancing Square CS07 0 0
Bot CSEA1 0 0
Giant fountain IOPC1111 0 0
The Big Fight AXR3P2 0 0
Kingdom Protection ALK1103 0 0
MICAPOKALEBE INS0904 0 0
The magical escape IOPC1205 0 0
Partitioning the plane IOPC1106 0 0
Conference AXR2P1 0 0
Chip It! TGPA04 0 0
Conversion PGM4 0 0
Crack the DNA CREDF4 0 0
Race ARAN02 0 0
Bulls et Cows CD105 0 0
Jay and Viru SALG05 0 0
Subnetting DSPCXI03 0 0
FLAGS INS0905 0 0
Fair bases IOPC1206 0 0
Max Change ENCD01 0 0
Problem 5 CME05 0 0
Reflections CS03 0 0
Simulator CRAFT04 0 0
Leaky containers IOPC1107 0 0
Distorted Palindrome ENCD12 0 0
Problem 4 CMB04 0 0
BitEasy PGM5 0 0
Iterated Bitcount Function IBT 0 0
Dairy Day AXR1P1 0 0
Mapping the Swaps TQ1 0 0
Modified Travelling Salesperson Problem ENCD07 0 0
Filling the Gaps CS10 0 0
Encryption CSEA3 0 0
Wiring ALG02 0 0
Universal Zero AXR3P4 0 0
Number Factors ENCD02 0 0
Algorithm Challenge SALG01 0 0
Problem 3 CME03 0 0
Tourist Guide CS04 0 0
Marbles MANIP5 0 0
The Nutty Professor AXR2P3 0 0
ALIEN CELL INS0901 0 0
Problem 5 CMB05 0 0
Alien Dictionary PGM6 0 0

Directi Go for Gold

RECENT COMMENTS FOR THIS SECTION:

01:35 AM Feb 12th: raghuu1990 commented on Palindrome: Ans of 2nd test case is 8888
12:43 AM Feb 12th: coded_gsn commented on Word Metamorphism : HOW MANY TEST CASES?
02:52 AM Feb 11th: chan00 commented on StringCode: for eg: for string "asd" it contains odd number of characters which is invalid inp...
02:48 AM Feb 11th: chan00 commented on StringCode: here the string doesnot contain even number of characters in testcases that is y m...
02:35 AM Feb 11th: chan00 commented on StringCode: What is wrong in this solution shown below ? #include #include int main() ...
02:19 PM Feb 9th: sumon commented on Windows: I am impressed
03:03 AM Feb 7th: cs1rangers commented on Anagram: if array size 21 wrong answer!!!!...if 26 correct :)
10:39 PM Feb 2nd: mamundewan commented on Problem 2: i don,t understad
06:58 PM Jan 30th: nishant204 commented on Not that Digit: @raman92-post your program.....want to see your time limit
05:05 PM Jan 28th: raman92 commented on Not that Digit: ths problem shd be under the easy label

HELP

Program should read from standard input and write to standard output. After you submit a solution you can see your results by clicking on the [My Submissions] tab on the problem page. Below are the possible results:

 

  • Accepted Your program ran successfully and gave a correct answer. If there is a score for the problem, this will be displayed in parenthesis next to the checkmark.
  • Time Limit Exceeded Your program was compiled successfully, but it didn't stop before time limit. Try optimizing your approach.
  • Wrong Answer Your program compiled and ran succesfully but the output did not match the expected output.
  • Runtime Error Your code compiled and ran but encountered an error. The most common reasons are using too much memory or dividing by zero. For the specific error codes see the help section.
  • Compilation Error Your code was unable to compile. When you see this icon, click on it for more information.
  • If you are still having problems, see a sample solution here.

CodeChef is a global programming communityCodeChef hosts online programming competitions
CodeChef is a non-commercial competitive programming community
  • About CodeChef
  • About Directi
  • CEO's Corner
  • C-Programming
  • Programming Languages
  • Contact Us
© 2009 Directi Group. All Rights Reserved. CodeChef uses SPOJ © by Sphere Research Labs
In order to report copyright violations of any kind, send in an email to copyright@codechef.com
CodeChef a product of Directi
The time now is:
CodeChef - A Platform for Aspiring Programmers

CodeChef was created as a platform to help programmers make it big in the world of computer programming. At CodeChef we work hard to revive the geek in you by hosting programming contests on a monthly basis. We also aim to have training sessions and events related to online programming for programmers around the world. Apart from providing a platform for programming competitions, CodeChef also has various tutorials and forum discussions to help those who are new to the world of computer programming.

Practice Section - A Place to hone your 'Computer Programming Skills'

Try your hand at one of our many practice problems and submit your solution in a language of your choice. Our judge accepts solutions in over 35+ programming languages. Online programming was never this much fun! Receive points, and move up through the CodeChef ranks. Use our practice section to better prepare yourself for the multiple programming competitions that take place through-out the month on CodeChef.

Compete - Monthly Programming Contests and Cook-offs

Here is where you can show off your computer programming skills. Take part in our 10 day long monthly programming contests and the shorter format Cook-off programming contests. Put yourself up for recognition and win great prizes. Prizes worth up to Rs.20,000 and $700 are up for grabs every month along with lots more CodeChef goodies.

Discuss

Are you new to computer programming? Do you need help with algorithms? Then be part of CodeChefs Forums and interact with all our programmers love helping out other programmers and share their ideas.

CodeChef Community

As part of our Educational initiative, we give institutes the opportunity to associate with CodeChef in the form of Campus Chapters. Hosting online programming competitions is not the only feature on CodeChef. Be a part of the CodeChef community through CodeChef meetups and techtalks. You can also host a programming contest for your institute on CodeChef and be a guest author on our blog.

Domain Name Registration, Web hosting, and Website Design provided by BigRock.com