CodeChef Logo CodeChef Logo
Courses

Programming and DSA

Learn to think like a programmer. Develop your problem-solving skills with essential data structures and algorithms.

Career Paths

From beginner to job-ready. Explore our curated career paths designed to help you succeed in the tech industry.

Other Courses

Programming and DSA

Explore courses

Catalogue

Programming and DSA

Learn to think like a programmer. Develop your problem-solving skills with essential data structures and algorithms.

Career Paths

From beginner to job-ready. Explore our curated career paths designed to help you succeed in the tech industry.

Other Courses

Explore courses
Practice Compete Compiler
Upgrade to Pro
Courses

Programming and DSA

Learn to think like a programmer. Develop your problem-solving skills with essential data structures and algorithms.

Career Paths

From beginner to job-ready. Explore our curated career paths designed to help you succeed in the tech industry.

Other Courses

Programming and DSA

Explore courses

Catalogue

Programming and DSA

Learn to think like a programmer. Develop your problem-solving skills with essential data structures and algorithms.

Career Paths

From beginner to job-ready. Explore our curated career paths designed to help you succeed in the tech industry.

Other Courses

Explore courses
Practice Compete Compiler
Home » Wiki » March 2012 Cook-off Problem Editorials

March 2012 Cook-off Problem Editorials

Problem Setter for the contest was Hiroto Sekido.

Problem Tester for the contest was Rajiv Kumar Aggarwal.

----------------------------------------------------------

CIELGAME : Ciel and Genjiko

Editorial

----------------------------------------------------------

CIELLAND : Ciel and a new island

Editorial

----------------------------------------------------------

CIELNUM1 : Ciel Numbers I

Editorial

----------------------------------------------------------

CIELNUM2 : Ciel Numbers II

Editorial

----------------------------------------------------------

CIELWEB : Ciel and Communications System

Editorial

----------------------------------------------------------

Ok then what's this??

2★coder_c @ 19 Mar 2012 03:05 PM
Ok then what's this?? http://www.codechef.com/download/Solutions/COOK20/Setter/CIELNUM2.c

@singh_637 : Please try

1★rajiv_adm @ 19 Mar 2012 11:29 PM
@singh_637 : Please try running your solution on sample test case.

@withoutc: Here I consider a

1★rajiv_adm @ 19 Mar 2012 11:53 PM
@withoutc: Here I consider a base 4 no. I considered decimal representation which contains only one of these 4 digits: 0, 3, 5 and 8. If It contains any other no., then it is not ciel no. I considered 0(base 4) = 0(base 10) 1(base 4) = 3(base 10) 2(base 4) = 5(base 10) 3(base 4) = 8(base 10) If there are zero in between, then it is not ciel no. Now question arise, Why use 0? Why not use base 3? If I would have used base 3 by replacing 3(base 10) = 0(base 3) then then 3, 33, 333, 3333, .... all become 0. This solution could have been further optimized to base 3. But base 4 was good enough to be solved within time limit.
Workden, MNR PRIDE, 14, HAL Old Airport Rd, Domlur I Stage, 1st Stage, DOMLUR, Bengaluru, Karnataka 560071 [email protected] +91 95911 47880
Find us online

ROADMAPS

Learn Python
Learn Java
Learn C
Learn C++
Data structures and Algorithms
Competitive Programming
More Roadmaps

CAREER PATHS

React JS Developer
Full stack Developer
SQL for Data Analysis
Frontend Developer
Java Backend Developer
Data Analysis using Python
Python Backend Developer
C++ Developer
Machine Learning using Python

COMPILERS

HTML online compiler
C++ online compiler
C online compiler
Java online compiler
Python online compiler
SQL online compiler
JavaScript online compiler
React online compiler
More compilers

COMPANY

About us
For colleges
Coding Contests
Blogs
Contact us
Privacy Policy
Frequently Asked Questions

© 2025 CodeChef Inc. All rights reserved.

We use cookies to improve your experience and for analytical purposes. Read our Privacy Policy and Terms to know more. You consent to our cookies if you continue to use our website.