結果

問題 No.207 世界のなんとか
ユーザー mannshi222mannshi222
提出日時 2022-03-22 22:58:55
言語 C++17(clang)
(17.0.6 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 316 bytes
コンパイル時間 997 ms
コンパイル使用メモリ 119,040 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-10 17:21:04
合計ジャッジ時間 1,740 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cstring>

using namespace std;

int main()
{
	int A, B;
	char tmp[30];
	cin >> A >> B;
	for( int i = A; i <= B; i++ ) {
		if( i % 3 == 0 ) {
			cout << i << endl;
			continue;
		}
		sprintf( tmp, "%d", i );
		if( strchr( tmp, '3' ) != NULL ) {
			cout << i << endl;
		}
	}
	return 0;
}
0