코딩도장

코딩도장

변경이력

돌아가기
5 51개 문자 추가 6개 문자 삭제

2014年06月19日 07:29

Roy

```{.python} def count_8n(num, n): tot_count = 0 str_n = str(n) for i in range(0, num + 1): temp_str = str(i) tot_count += temp_str.count('8'str_n) return tot_count n = 8 tot_num = count_8n(10000, n) print("total number of 8%d is %d" %(n, tot_num)) ```
```{.python} def count_8n(num, n): tot_count = 0 str_n = str(n) for i in range(0, num + 1): temp_str = str(i) tot_count += temp_str.count('8'str_n) return tot_count n = 8 tot_num = count_8n(10000, n) print("total number of 8%d is %d" %(n, tot_num)) ```
```{.python} def count_8n(num, n): tot_count = 0 str_n = str(n) for i in range(0, num + 1): temp_str = str(i) tot_count += temp_str.count('8'str_n) return tot_count n = 8 tot_num = count_8n(10000, n) print("total number of 8%d is %d" %(n, tot_num)) ```
4 17개 문자 추가 83개 문자 삭제

2014年06月19日 07:27

Roy

```{.python} def count_8(num): tot_count = 0 for i in range(0, num + 1): temp_str = str(i) tot_count += temp_str.count('8') return tot_count tot_num = count_8(10000) print("total number of 8 is %d" %tot_num) count = 0 for i in range(1,10001): count += str(i).count('8') print(count)```
```{.python} def count_8(num): tot_count = 0 for i in range(0, num + 1): temp_str = str(i) tot_count += temp_str.count('8') return tot_count tot_num = count_8(10000) print("total number of 8 is %d" %tot_num) count = 0 for i in range(1,10001): count += str(i).count('8') print(count)```
```{.python} def count_8(num): tot_count = 0 for i in range(0, num + 1): temp_str = str(i) tot_count += temp_str.count('8') return tot_count tot_num = count_8(10000) print("total number of 8 is %d" %tot_num) count = 0 for i in range(1,10001): count += str(i).count('8') print(count)```
3 85개 문자 추가

2014年06月19日 07:26

Roy

def count_8(num): tot_count = 0 for i in range(0, num + 1): temp_str = str(i) tot_count += temp_str.count('8') return tot_count tot_num = count_8(10000) print("total number of 8 is %d" %tot_num) count = 0 for i in range(1,10001): count += str(i).count('8') print(count)
def count_8(num): tot_count = 0 for i in range(0, num + 1): temp_str = str(i) tot_count += temp_str.count('8') return tot_count tot_num = count_8(10000) print("total number of 8 is %d" %tot_num) count = 0 for i in range(1,10001): count += str(i).count('8') print(count)
def count_8(num): tot_count = 0 for i in range(0, num + 1): temp_str = str(i) tot_count += temp_str.count('8') return tot_count tot_num = count_8(10000) print("total number of 8 is %d" %tot_num) count = 0 for i in range(1,10001): count += str(i).count('8') print(count)
2 4개 문자 삭제

2014年06月19日 07:25

Roy

def count_8(num): tot_count = 0 for i in range(0, num + 1): temp_str = str(i) tot_count += temp_str.count('8') return tot_count tot_num = count_8(10000) print("total number of 8 is %d" %tot_num)
def count_8(num): tot_count = 0 for i in range(0, num + 1): temp_str = str(i) tot_count += temp_str.count('8') return tot_count tot_num = count_8(10000) print("total number of 8 is %d" %tot_num)
def count_8(num): tot_count = 0 for i in range(0, num + 1): temp_str = str(i) tot_count += temp_str.count('8') return tot_count tot_num = count_8(10000) print("total number of 8 is %d" %tot_num)
1 Original

2014年06月19日 07:25

Roy

def count_8(num): tot_count = 0 for i in range(0, num + 1): temp_str = str(i) tot_count += temp_str.count('8') return tot_count tot_num = count_8(10000) print("total number of 8 is %d" %tot_num)
def count_8(num): tot_count = 0 for i in range(0, num + 1): temp_str = str(i) tot_count += temp_str.count('8') return tot_count tot_num = count_8(10000) print("total number of 8 is %d" %tot_num)
코딩도장

코딩도장은 프로그래밍 문제풀이를 통해서 코딩 실력을 수련(Practice)하는 곳입니다.

코딩도장 © 2014 · 문의 [email protected]
피드백 · 개인정보취급방침 · RSS

AltStyle によって変換されたページ (->オリジナル) /