結果

問題 No.207 世界のなんとか
ユーザー TosukeTosuke
提出日時 2016-04-09 17:57:31
言語 D
(dmd 2.106.1)
結果
WA  
実行時間 -
コード長 418 bytes
コンパイル時間 1,520 ms
コンパイル使用メモリ 138,056 KB
実行使用メモリ 4,496 KB
最終ジャッジ日時 2023-09-02 21:07:11
合計ジャッジ時間 2,730 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 2 ms
4,368 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 2 ms
4,368 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 1 ms
4,368 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import std.stdio, std.conv, std.string, std.range, std.array, std.algorithm;

int main(){
	auto I = readln().strip().split().map!(to!int)().array();
	auto S = iota(I[0],I[1]-I[0]+2).map!(nabe)();
	foreach(string s; S){
		s.writef();
	}
	return 0;
}

string nabe(int n){
	if(n%3 == 0){
		return n.to!string()~"\n";
	}
	int a = n;
	while(a>0){
		if(a%10 == 3){
			return n.to!string()~"\n";
		}
		a/=10;
	}
	return "";
}
0