結果
問題 | No.207 世界のなんとか |
ユーザー |
|
提出日時 | 2015-12-10 08:56:55 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 451 bytes |
コンパイル時間 | 768 ms |
コンパイル使用メモリ | 57,952 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-09 10:39:33 |
合計ジャッジ時間 | 1,387 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
ソースコード
#include <iostream> #include <string> int main() { int A, B, o[100]; std::string str[100]; std::cin >> A; std::cin >> B; for(int i = A; i <= B; i++) { o[i - A] = i; str[i - A] = std::to_string(i); } for(int i = 0; i <= B - A; i++) { if(o[i] % 3 == 0) { std::cout << o[i] << std::endl; continue; } for(const char c : str[i]) { if(c == '3') { std::cout << str[i] << std::endl; break; } } } return 0; }