結果
| 問題 |
No.207 世界のなんとか
|
| コンテスト | |
| ユーザー |
sten_san
|
| 提出日時 | 2020-09-26 15:26:47 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 876 bytes |
| コンパイル時間 | 1,766 ms |
| コンパイル使用メモリ | 192,952 KB |
| 最終ジャッジ日時 | 2025-01-14 22:22:31 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
template <typename T> using vec = vector<T>;
template <typename T> using vvec = vector<vector<T>>;
constexpr int64_t mpow(int64_t a, int64_t b, int64_t mod = 1000000007) {
if (b <= 0) { return 1; } if (b == 1) { return a % mod; } if (b == 2) { return (a * a) % mod; }
return (max(a * (b & 1), (int64_t)1) * mpow(mpow(a, b / 2, mod), 2, mod)) % mod;
}
constexpr int64_t mdiv(int64_t a, int64_t b, int64_t mod = 1000000007) {
return (a * mpow(b, mod - 2, mod)) % mod;
}
int main() {
int a, b; cin >> a >> b;
for (int i = a; i <= b; ++i) {
if (i % 3 == 0) {
cout << i << endl;
continue;
}
int j = i;
while (j) {
if (j % 10 == 3) {
cout << i << endl;
break;
}
j /= 10;
}
}
}
sten_san