/*The problem description evaluates the decomposition of the mass factor of all integers in the interval [a, b]. Input format input Two integers a, b. Output format output one number per line decomposition, shaped like k=a1*a2*a3 ... (A1<=a2<=a3...,k is also from small to large) (see example) sample input 3 10 sample output 3=34=2*25=56=2*37=78=2*2*29=3*310=2*5 prompt to sift out all primes before decomposition. Data size and conventions 2<=a<=b<=10000*/#include<stdio.h>#include<math.h>intMain () {Long intB,i,k,m,n,w =0; scanf ("%ld%ld",&m,&N); for(i = m;i<=n;i++) {printf ("%ld=", i); b= I;k =2; while(k<=sqrt (i)) { if(b%k==0) {b= bK; if(b>1) {printf ("%ld*", k);Continue; } if(b==1) printf ("%ld\n", K); } k++; } if(b>1&&b<i) printf ("%ld\n", B); if(b==i) {printf ("%d\n", i); w++; } } return 0; }
Blue Bridge Cup _ basic practice "decomposition factorization---28"