7 solutions

  • 0
    @ 2025-10-11 23:42:55

    c

    #include <stdio.h> int main(){ long long Q,x; scanf("%lld",&Q); while(Q--){ int cnt=0; int ret=1; scanf("%lld\n",&x); for(cnt=2;cnt<x;cnt++){ if(x%cnt0) {ret=0;} } printf(ret1 ? "Yes\n":"No\n"); } return 0; }

    Information

    ID
    43
    Time
    5000ms
    Memory
    256MiB
    Difficulty
    7
    Tags
    # Submissions
    1356
    Accepted
    276
    Uploaded By