結果

問題 No.207 世界のなんとか
ユーザー shimagera_san
提出日時 2017-09-02 11:24:33
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 402 bytes
コンパイル時間 493 ms
コンパイル使用メモリ 61,116 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-11-06 18:33:09
合計ジャッジ時間 1,216 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
#include <string>

using namespace std;

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

	for(int i = A; i <= B; i++)
	{
		if(i % 3 == 0)
		{
			cout << i << endl;
		}
		else
		{
			string str(to_string(i));
			for(int j = 0; j < str.size(); j++)
			{
				if(str[j] == '3')
				{
					cout << i << endl;
					break;
				}
			}
		}
	}
	return 0;
}
0