diff --git a/TangDou/LanQiaoBei/LanQiao14STEMA20230212/2.cpp b/TangDou/LanQiaoBei/LanQiao14STEMA20230212/2.cpp new file mode 100644 index 0000000..5dd0d91 --- /dev/null +++ b/TangDou/LanQiaoBei/LanQiao14STEMA20230212/2.cpp @@ -0,0 +1,20 @@ +#include +using namespace std; +int main() { + int n, m; + cin >> n >> m; + int cnt = 0; + for (int i = n; i <= m; i++) { + int x = i; + bool flag = false; + while (x) { + int a = x % 10; + if (a % 2 == 0) flag = true; + x /= 10; + } + if (!flag) cnt++; + } + cout << cnt << endl; + + return 0; +} diff --git a/TangDou/LanQiaoBei/LanQiao14STEMA20230212/8.cpp b/TangDou/LanQiaoBei/LanQiao14STEMA20230212/8.cpp new file mode 100644 index 0000000..3ea813d --- /dev/null +++ b/TangDou/LanQiaoBei/LanQiao14STEMA20230212/8.cpp @@ -0,0 +1,18 @@ +#include +using namespace std; +int main() { + int n, cnt = 0; + cin >> n; + cnt = n / 3; + if (n == 2) + cnt = -1; + else if (n == 4) + cnt = 4; + else if (n % 3 == 1) + cnt += 1; + else if (n % 3 == 2) + cnt += 2; + + cout << cnt << endl; + return 0; +} \ No newline at end of file diff --git a/TangDou/LanQiaoBei/LanQiao14STEMA20230212/题解.md b/TangDou/LanQiaoBei/LanQiao14STEMA20230212/题解.md new file mode 100644 index 0000000..7bc7009 --- /dev/null +++ b/TangDou/LanQiaoBei/LanQiao14STEMA20230212/题解.md @@ -0,0 +1,3 @@ +https://blog.csdn.net/qq_36230375/article/details/134725732 + +https://tiku.scratchor.com/paper/view/gjfvsjrgtpm30v3f \ No newline at end of file