結果

問題 No.207 世界のなんとか
ユーザー toshiro_yanagi
提出日時 2019-01-09 00:58:02
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 307 bytes
コンパイル時間 539 ms
コンパイル使用メモリ 63,232 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-24 00:51:49
合計ジャッジ時間 1,379 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

bool judge(int n)
{
	int res = n % 3 == 0 ? true : false;
	while (n != 0)
	{
		res = n % 10 == 3 ? true : res;
		n /= 10;
	}
	return res;
}

int main()
{
	int A, B;
	cin >> A >> B;

	for (int i = A; i <= B; i++)
	{
		if (judge(i))
		{
			cout << i << endl;
		}
	}
}
0