Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- long long s = 1;
- char ch = getchar();
- while (ch != '\n')
- {
- if (ch == '3')
- s *= 3;
- if (ch == '5')
- s *= 5;
- if (ch == '7')
- s *= 7;
- ch = getchar();
- }
- cout << (s == 1 ? 0 : s);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement