Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define _CRT_SECURE_NO_WARNINGS
- #define _USE_MATH_DEFINES
- #include <iostream>
- #include <string>
- #include <algorithm>
- #include <vector>
- #include <map>
- #include <queue>
- #include <set>
- #include <stack>
- using namespace std;
- typedef long long ll;
- vector<ll> mas(100001,0);
- void prost(ll num)
- {
- ll sc = 1;
- ll p = 0;
- for (int i = 2; i <= num; i++)
- {
- p = 0;
- while (num%i==0)
- {
- num /= i;
- p++;
- }
- mas[i] += p;
- }
- }
- int main()
- {
- //freopen("input.txt", "rt", stdin);
- //freopen("output.txt", "wt", stdout);
- ll answ=1;
- ll prom;
- for (int i = 1; i <= 10; i++)
- {
- cin >> prom;
- prost(prom);
- }
- for (int i = 1; i <= 100000; i++)
- {
- if (mas[i] != 0)
- {
- answ *= (mas[i] + 1);
- answ %= 10;
- }
- }
- cout << answ;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement