Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <cmath>
- #include <iomanip>
- using namespace std;
- int main(int argc, const char * argv[]) {
- int a, b,h,v,n, N;
- cin>>v;
- n=1;
- a=1;
- h=1;
- N=1;
- b=v/a;
- for (n = 1; n < v; n++)
- {
- for (N = 1; N < v; N++) {
- if (a*n<=b/n && h*N<=b/N)
- {
- if (b%n==0 && b%(N*n)==0)
- {
- cout<<a*n<<"x"<<h*N<<"x"<<b/(n*N) << endl;
- }
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement