为什么我只有90分????????

lyh198 波风水门 2024-11-16 14:34:51 2

#include <bits/stdc++.h> using namespace std; int main() { long long n; cin >> n; long long a = 0; long long p = 2; if (n == 1) cout << 1 << endl; while (n > 1) { long long cut = 0; while (n % p == 0) { n /= p; cut++; } if (cut > 0) { if (a) cout << "*"; cout << p; if (cut > 1) cout << "^" << cut; a = 1; } p++; } cout << endl; }

{{ vote && vote.total.up }}

共 2 条回复

lyh198 波风水门

???

root 站长

循环次数太多了