結果

問題 No.207 世界のなんとか
ユーザー soupesuteakasoupesuteaka
提出日時 2016-03-02 19:48:27
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 28 ms / 5,000 ms
コード長 338 bytes
コンパイル時間 103 ms
コンパイル使用メモリ 10,728 KB
実行使用メモリ 9,228 KB
最終ジャッジ日時 2023-07-30 15:34:26
合計ジャッジ時間 1,486 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
9,224 KB
testcase_01 AC 25 ms
9,072 KB
testcase_02 AC 25 ms
9,084 KB
testcase_03 AC 25 ms
9,176 KB
testcase_04 AC 25 ms
9,104 KB
testcase_05 AC 25 ms
9,080 KB
testcase_06 AC 25 ms
9,072 KB
testcase_07 AC 25 ms
9,080 KB
testcase_08 AC 24 ms
9,072 KB
testcase_09 AC 25 ms
9,184 KB
testcase_10 AC 25 ms
9,060 KB
testcase_11 AC 24 ms
9,220 KB
testcase_12 AC 27 ms
9,152 KB
testcase_13 AC 25 ms
9,184 KB
testcase_14 AC 26 ms
9,204 KB
testcase_15 AC 25 ms
9,228 KB
testcase_16 AC 25 ms
9,080 KB
testcase_17 AC 25 ms
9,152 KB
testcase_18 AC 25 ms
9,080 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#coding: UTF-8

import sys
import re
import itertools
from collections import deque

### defs ###
def con3(x):
	while x > 0:
		if (x%10==3):
			return True
		x = x//10
	return False

### main ###
A, B = map(int, sys.stdin.readline().split())
ans = []
for x in range(A,B+1):
	if (x%3==0 or con3(x)):
		ans.append(x)
for x in ans:
	print(x)
0