結果
問題 | No.207 世界のなんとか |
ユーザー |
![]() |
提出日時 | 2018-10-27 14:22:29 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 428 bytes |
コンパイル時間 | 424 ms |
コンパイル使用メモリ | 56,396 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-19 06:49:09 |
合計ジャッジ時間 | 1,168 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
ソースコード
#include <iostream>#include <string>bool include_three(int num) {std::string num_str(std::to_string(num));return (num_str.find("3") != std::string::npos);}int main(int argc, char *argv[]) {int start_num = 0;int end_num = 0;std::cin >> start_num;std::cin >> end_num;for (int i = start_num; i <= end_num; i++) {if ((i % 3 == 0) or include_three(i)) {std::cout << i << std::endl;}}return 0;}