CARVIEW |
Select Language
HTTP/2 200
date: Sun, 12 Oct 2025 05:10:47 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=dfc9d65fea749865336d59795ad052d559c4f514d4a10c8c770f6ad733929c81a%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22rB8dQP-ZxexdrB7IKKmsYASqni8BRVHB%22%3B%7D; HttpOnly; Path=/
cf-ray: 98d417c31df50bc9-BLR
#include <iostream>#include <sstream>#include <cstdlib>#include <bits/stdc - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <sstream>
- #include <cstdlib>
- #include <bits/stdc++.h>
- #include <algorithm>
- using namespace std;
- void sherry()
- {
- ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
- #ifndef ONLINE_JUDGE
- freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout);
- #endif
- }
- void fun(int n, int t[])
- {
- sort(t, t + n);
- cout << "The maximum number : " << t[n - 1] << "\n";
- cout << "The minimum number : " << t[0] << "\n";
- }
- bool prim(int a)
- {
- if (a < 2)
- {
- return false;
- }
- else
- {
- for (int i = 2; i <= sqrt(a); i++)
- {
- if (a % i == 0)
- return false;
- }
- return true;
- }
- }
- bool par(int a)
- {
- int s = a;
- int d, sum = 0;
- while (a > 0)
- {
- d = a % 10;
- sum = (sum * 10) + d;
- a /= 10;
- }
- if (s == sum)
- {
- return true;
- }
- else
- {
- return false;
- }
- }
- int countdis(int n, int t[])
- {
- int max = 0, ind = 0;
- for (int j = 0; j < n; j++)
- {
- int count = 0;
- for (int i = 1; i < t[j] / 2; i++)
- {
- if (t[j] % i == 0)
- count++;
- }
- if (max <= count)
- {
- max = count;
- ind = j;
- }
- }
- return t[ind];
- }
- int main()
- {
- sherry();
- int n, pr = 0, pa = 0;
- cin >> n;
- int t[n];
- for (int i = 0; i < n; i++)
- {
- cin >> t[i];
- }
- for (int i = 0; i < n; i++)
- {
- int s = t[i];
- if (prim(s))
- pr++;
- if (par(s))
- pa++;
- }
- fun(n, t);
- cout << "The number of prime numbers : " << pr << "\n";
- cout << "The number of palindrome numbers : " << pa << "\n";
- cout << "The number that has the maximum number of divisors : " << countdis(n, t);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
-
Free Crypto Method (NEVER SEEN BEFORE)⭐⭐ O
JavaScript | 2 sec ago | 0.25 KB
-
✅ Make $2500 in 20 minutes⭐⭐⭐ H
JavaScript | 3 sec ago | 0.25 KB
-
📌 Swapzone +37% glitch
JavaScript | 4 sec ago | 0.24 KB
-
⭐✅ Swapzone Glitch ✅ Working ⭐⭐ 9
JavaScript | 10 sec ago | 0.25 KB
-
📌 Swapzone +37% glitch ⭐ 5
JavaScript | 12 sec ago | 0.25 KB
-
💵 Make 3000$ in 20 minutes 💵
JavaScript | 14 sec ago | 0.24 KB
-
✅ Make $2500 in 20 minutes⭐⭐⭐ D
JavaScript | 19 sec ago | 0.25 KB
-
✅⭐ Make huge profits on trading ⭐⭐ E
JavaScript | 23 sec ago | 0.25 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand