ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 2102. Michael and Cryptography

AC, but which test gives TLE!?
Posted by lnxdx 29 Oct 2019 00:41
Can someone provide a test, that makes the following code get TLE?

// ITNOA
#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
    ll n;
    cin >> n;
    int cnt = 0;
    for (ll i = 2;i*i <= min((ll)1e18, n);i++)
        while (n%i == 0)
        {
            n /= i;
            cnt++;
        }
    if (n > 1)
        cnt++;
    if (cnt == 20)
        cout << "Yes\n";
    else
        cout << "No\n";
}