更新了许多

This commit is contained in:
OhFengGO
2023-08-23 21:52:51 +08:00
parent 971a1d91d6
commit fc324f936b
197 changed files with 6500 additions and 0 deletions

View File

@ -0,0 +1,35 @@
#include <iostream>
#include <iomanip>
#include <cmath>
#include <cstdio>
using namespace std;
int main(){
int n,first=1,cnt=0;
cin >>n;
if(n==1){
cout <<"1=1";
return 0;
}
cout <<n<<"=";
for(int i=2;i<=n;i++){
while(n%i==0){
cnt++;
n/=i;
}
if(cnt>0){
if(first!=1){
cout <<"*";
}
else{
first=0;
}
cout <<i;
if(cnt>=2){
cout <<"^"<<cnt;
}
cnt=0;
}
}
return 0;
}