結果
問題 | No.207 世界のなんとか |
ユーザー |
|
提出日時 | 2019-02-04 10:53:13 |
言語 | C++11 (gcc 13.3.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 757 bytes |
コンパイル時間 | 880 ms |
コンパイル使用メモリ | 65,844 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-24 12:36:24 |
合計ジャッジ時間 | 1,718 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 WA * 18 |
ソースコード
#include <iostream> #include <vector> #include <map> #include <array> using namespace std; template<class T> int maxReturn(T a, T b) {if (a > b) {return a;} else {return b;}} template<class T> int minReturn(T a, T b) {if (a < b) {return a;} else {return b;}} int main(void){ int A,B; string ans = ""; cin >> A >> B; for (int i = A; i <= B; i++) { if (i % 3 == 0) { ans += to_string(i) + "\n"; } else { string tmp = to_string(i); size_t count = tmp.length(); for (int j = 0; j < count; j++) { if (tmp[j] == '3') { ans += tmp + "\n"; break; } } } } cout << ans << endl; }