結果
問題 | No.207 世界のなんとか |
ユーザー |
![]() |
提出日時 | 2015-05-25 00:41:41 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 411 bytes |
コンパイル時間 | 648 ms |
コンパイル使用メモリ | 60,120 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-09 10:18:50 |
合計ジャッジ時間 | 1,239 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
ソースコード
#include <iostream>#include <algorithm>#include <numeric>#include <sstream>#include <cstdio>#include <cstring>using namespace std;int main(int argc, char *argv[]){string s;getline(cin, s);stringstream ss(s);int A, B;ss >> A >> B;for (int n = A; n <= B; ++n) {char w[16];sprintf(w, "%d", n);if ((n % 3) == 0 || (strchr(w, '3') != NULL)) {cout << n << endl;}}return 0;}