QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#362057#8508. DiviDueloucup-team2443#WA 18ms69364kbC++201.3kb2024-03-23 14:00:362024-03-23 14:00:38

Judging History

This is the latest submission verdict.

  • [2024-03-23 14:00:38]
  • Judged
  • Verdict: WA
  • Time: 18ms
  • Memory: 69364kb
  • [2024-03-23 14:00:36]
  • Submitted

answer

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N=1919810;
ll n,m,k;
int a[N],b[N];
int cnt[N];

ll ans;
string s[N];

int dp[N][3];//选了前i个 现在有j个连续辅音

map<char,int> mp;

stack<int> st1,st2;

int tf[N];
vector<int> v;



void __(){
    cin>>n;
    ll t=sqrt(n);
    if(t*t==n){
        puts("N");
        return;
    }
    int cnt=0;
    vector<int> v;
    for(ll i=1;i<=n/i;i++){
        if(n%i==0){
            v.push_back(i);
            cnt++;
            if(i!=n/i){
                v.push_back(n/i);
                cnt++;
            }
        }
    }
    sort(v.begin(),v.end());
    if(v.size()==2){
        puts("Y");
        return;
    }
    if(v.size()%2){
        puts("N");
        return;
    }else{
        puts("Y");
        return;
    }
    ll cnt1=0,cnt2=0;
    // for(int i=1;i<v.size();i++){
    //     if(v[i]%v[1]==0) cnt1++;
    //     if(v[i]%v[2]==0) cnt2++;
    // }
    // if(cnt1==v.size()-1){
    //     puts("Y");
    //     return;
    // }
    // if(cnt1==v.size()-2&&cnt2==v.size()-2){
    //     puts("Y");
    //     return;
    // }
    puts("N");
}

int main()
{
    
    
    int _=1;
    // cin>>_;
    while(_--){
        __();
    }
}
//NYYYNNNNNYN

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 9ms
memory: 69092kb

input:

10

output:

Y

result:

ok "Y"

Test #2:

score: 0
Accepted
time: 6ms
memory: 67016kb

input:

9

output:

N

result:

ok "N"

Test #3:

score: 0
Accepted
time: 7ms
memory: 69052kb

input:

1

output:

N

result:

ok "N"

Test #4:

score: 0
Accepted
time: 12ms
memory: 67256kb

input:

549755813888

output:

Y

result:

ok "Y"

Test #5:

score: 0
Accepted
time: 11ms
memory: 67088kb

input:

274877906944

output:

N

result:

ok "N"

Test #6:

score: 0
Accepted
time: 7ms
memory: 69096kb

input:

847288609443

output:

Y

result:

ok "Y"

Test #7:

score: 0
Accepted
time: 8ms
memory: 69288kb

input:

282429536481

output:

N

result:

ok "N"

Test #8:

score: 0
Accepted
time: 15ms
memory: 69068kb

input:

137858491849

output:

N

result:

ok "N"

Test #9:

score: 0
Accepted
time: 6ms
memory: 69364kb

input:

10604499373

output:

Y

result:

ok "Y"

Test #10:

score: 0
Accepted
time: 18ms
memory: 67108kb

input:

506623120463

output:

Y

result:

ok "Y"

Test #11:

score: 0
Accepted
time: 4ms
memory: 66964kb

input:

10779215329

output:

N

result:

ok "N"

Test #12:

score: 0
Accepted
time: 11ms
memory: 67060kb

input:

41910794561

output:

Y

result:

ok "Y"

Test #13:

score: 0
Accepted
time: 8ms
memory: 67236kb

input:

64574155417

output:

Y

result:

ok "Y"

Test #14:

score: 0
Accepted
time: 12ms
memory: 67292kb

input:

75644818241

output:

Y

result:

ok "Y"

Test #15:

score: 0
Accepted
time: 12ms
memory: 66964kb

input:

124029899611

output:

Y

result:

ok "Y"

Test #16:

score: 0
Accepted
time: 12ms
memory: 69112kb

input:

134306640043

output:

Y

result:

ok "Y"

Test #17:

score: 0
Accepted
time: 8ms
memory: 69016kb

input:

146462570411

output:

Y

result:

ok "Y"

Test #18:

score: 0
Accepted
time: 8ms
memory: 67108kb

input:

222287988673

output:

Y

result:

ok "Y"

Test #19:

score: 0
Accepted
time: 11ms
memory: 69052kb

input:

263345887171

output:

Y

result:

ok "Y"

Test #20:

score: 0
Accepted
time: 11ms
memory: 67064kb

input:

717451682557

output:

Y

result:

ok "Y"

Test #21:

score: 0
Accepted
time: 11ms
memory: 67264kb

input:

825365364157

output:

Y

result:

ok "Y"

Test #22:

score: 0
Accepted
time: 8ms
memory: 69112kb

input:

870298842859

output:

Y

result:

ok "Y"

Test #23:

score: 0
Accepted
time: 16ms
memory: 67084kb

input:

887915259331

output:

Y

result:

ok "Y"

Test #24:

score: 0
Accepted
time: 12ms
memory: 69284kb

input:

967108197509

output:

Y

result:

ok "Y"

Test #25:

score: 0
Accepted
time: 10ms
memory: 67068kb

input:

990661375799

output:

Y

result:

ok "Y"

Test #26:

score: 0
Accepted
time: 11ms
memory: 69108kb

input:

999999999989

output:

Y

result:

ok "Y"

Test #27:

score: 0
Accepted
time: 17ms
memory: 69308kb

input:

999962000357

output:

Y

result:

ok "Y"

Test #28:

score: 0
Accepted
time: 16ms
memory: 67048kb

input:

999474022513

output:

Y

result:

ok "Y"

Test #29:

score: 0
Accepted
time: 12ms
memory: 67292kb

input:

999052035451

output:

Y

result:

ok "Y"

Test #30:

score: 0
Accepted
time: 8ms
memory: 67092kb

input:

999470040641

output:

Y

result:

ok "Y"

Test #31:

score: 0
Accepted
time: 10ms
memory: 69104kb

input:

998712349711

output:

Y

result:

ok "Y"

Test #32:

score: 0
Accepted
time: 16ms
memory: 69016kb

input:

998768376647

output:

Y

result:

ok "Y"

Test #33:

score: 0
Accepted
time: 15ms
memory: 67024kb

input:

998884311283

output:

Y

result:

ok "Y"

Test #34:

score: 0
Accepted
time: 12ms
memory: 67004kb

input:

998794254709

output:

Y

result:

ok "Y"

Test #35:

score: 0
Accepted
time: 16ms
memory: 67048kb

input:

998830303021

output:

Y

result:

ok "Y"

Test #36:

score: 0
Accepted
time: 8ms
memory: 69304kb

input:

999638023157

output:

Y

result:

ok "Y"

Test #37:

score: 0
Accepted
time: 16ms
memory: 67068kb

input:

998978227997

output:

Y

result:

ok "Y"

Test #38:

score: 0
Accepted
time: 8ms
memory: 69120kb

input:

999108034891

output:

Y

result:

ok "Y"

Test #39:

score: 0
Accepted
time: 16ms
memory: 67048kb

input:

998922289621

output:

Y

result:

ok "Y"

Test #40:

score: 0
Accepted
time: 8ms
memory: 67316kb

input:

999172169371

output:

Y

result:

ok "Y"

Test #41:

score: 0
Accepted
time: 14ms
memory: 69268kb

input:

999218015981

output:

Y

result:

ok "Y"

Test #42:

score: -100
Wrong Answer
time: 8ms
memory: 69016kb

input:

981700934653

output:

Y

result:

wrong answer 1st words differ - expected: 'N', found: 'Y'