码迷,mamicode.com
首页 > 其他好文 > 详细

CC150 20.4

时间:2014-12-11 10:34:40      阅读:234      评论:0      收藏:0      [点我收藏+]

标签:interview

20.4 Write a method to count the number of 2s between 0 and n.

// What this mean?
// Given a n.
// for (int i = 0 -> n)
// {
//    result += numOf2In(i);
// }

// This is purely a math problem.


CC150 20.4

标签:interview

原文地址:http://7371901.blog.51cto.com/7361901/1588556

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!