Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
416 B
4
Indexable
Never
#include <stdio.h>
#include <math.h>
int main() {
    long long x;
    scanf("%lld", &x);
    long long krutoe = x+1;
    while (1) {
        long long i2 = (long long)sqrt(krutoe);
        long long i3 = (long long)cbrt(krutoe);
        
        if (i2 * i2 == krutoe && i3 * i3 * i3 == krutoe) {
            printf("%lld",krutoe);
            break;
        }
        
        krutoe++;
    }
    
    return 0;
}