結果

問題 No.207 世界のなんとか
ユーザー nyan68682154
提出日時 2019-05-12 20:15:32
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 393 bytes
コンパイル時間 469 ms
コンパイル使用メモリ 59,212 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-05 05:16:17
合計ジャッジ時間 1,415 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<string>
#include<math.h>
using namespace std;

int main() 
{
	int a,b,i,n;
	cin >> a >> b;
	for (i = a; i  < b+1;i++) {
		if (i % 3 == 0) {
			cout << i << "\n";
		}
		else {
			int s = i;
			for (n = 9; n >= 0; n--) {
				int pn = pow(10, n);
				if (s / pn == 3) {
					cout << i<<"\n";
				}
				else if (s >= pn) {
					s = s - pn*(s/pn);
				}

			}
		}
	}

} 
0