Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- #include <vector>
- #include <queue>
- #include <algorithm>
- #include <string>
- #include <stack>
- #include <set>
- #include <map>
- #define pii pair <int,int>
- #define vec vector
- using namespace std;
- using ll = long long;
- using ld = long double;
- using db = double;
- void cv(vector <int> &v){
- for (auto x: v) cout<<x<<' ';
- cout<<"\n";
- }
- void cvl(vector <ll> &v){
- for (auto x: v) cout<<x<<' ';
- cout<<"\n";
- }
- void cvv(vector <vector <int> > &v){
- for (auto x: v) cv(x);
- cout<<"\n";
- }
- void cvb(vector <bool> v){
- for (bool x: v) cout<<x<<' ';
- cout<<"\n";
- }
- ll div(ll x){
- ll res=0;
- for (ll k = 1; k <= x;++k){
- if (x%k==0) res++;
- }
- return res;
- }
- bool ok(ll n){
- if (div(n) != 14) return 0;
- ll m = 11584 - n;
- if (div(m) != 14) return 0;
- if (m*m*m % n == 0) return 1;
- return 0;
- }
- void sh(ll n){
- ll m = 11584 - n;
- cout<<"n m = "<<n<<' '<<m<<"\n";
- cout<<"n\n";
- for (ll k = 1; k <= n; ++k){
- if (n%k==0)cout<<k<<' ';
- }cout<<"\n";
- cout<<"m\n";
- for (ll k = 1; k <= m;++k){
- if (m%k==0)cout<<k<<' ';
- }cout<<"\n";
- cout<<"m^3 = "<<m*m*m<<"\n";
- cout<<"m^3 / n = "<<(m*m*m / n)<<"\n";
- cout<<"(m^3 / n) * n = " <<(m*m*m / n) * n<<"\n";
- }
- int main()
- {
- ios::sync_with_stdio(0);
- cin.tie(0);
- cout.tie(0);
- vector<ll>ans;
- for (ll i = 0; i <= 12e3;++i){
- if (ok(i)){
- ans.push_back(i);
- }
- }
- cout<<"ans\n";
- cvl(ans);
- sh(ans[0]);
- }
Add Comment
Please, Sign In to add comment