QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#635969#6566. Power of DivisorsSDDDDDDDDDGGWA 1ms3972kbC++14571b2024-10-12 21:38:592024-10-12 21:38:59

Judging History

你现在查看的是最新测评结果

  • [2024-10-12 21:38:59]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3972kb
  • [2024-10-12 21:38:59]
  • 提交

answer

#include <bits/stdc++.h>
using ll = long long;

std::map<ll, int> mp;

void solve() {
    ll n;
    std::cin >> n;
    if (mp[n] == 0) {
        std::cout << "-1\n";
    } else {
        std::cout << mp[n] << "\n";
    }
}

int main() {
    std::cin.tie(nullptr)->std::ios::sync_with_stdio(false);

    for (int i = 1; i <= 150; i++) {
        ll x = 0;
        for (int j = 1; j <= i; j++) {
            if (i % j == 0) {
                x++;
            }
        }
        mp[std::pow(1LL * i, x)] = i;
    }
    solve();

    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3772kb

input:

15625

output:

25

result:

ok single line: '25'

Test #2:

score: 0
Accepted
time: 1ms
memory: 3868kb

input:

64000000

output:

20

result:

ok single line: '20'

Test #3:

score: 0
Accepted
time: 1ms
memory: 3944kb

input:

65536

output:

-1

result:

ok single line: '-1'

Test #4:

score: 0
Accepted
time: 1ms
memory: 3908kb

input:

1

output:

1

result:

ok single line: '1'

Test #5:

score: 0
Accepted
time: 1ms
memory: 3920kb

input:

10

output:

-1

result:

ok single line: '-1'

Test #6:

score: 0
Accepted
time: 1ms
memory: 3972kb

input:

100

output:

-1

result:

ok single line: '-1'

Test #7:

score: 0
Accepted
time: 1ms
memory: 3972kb

input:

10000

output:

10

result:

ok single line: '10'

Test #8:

score: 0
Accepted
time: 1ms
memory: 3816kb

input:

1000000000000000000

output:

100

result:

ok single line: '100'

Test #9:

score: -100
Wrong Answer
time: 1ms
memory: 3964kb

input:

10372926089038969

output:

-1

result:

wrong answer 1st lines differ - expected: '218089', found: '-1'