QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#362055 | #8508. DiviDuelo | ucup-team2443# | WA | 4ms | 69168kb | C++20 | 1.2kb | 2024-03-23 13:59:45 | 2024-03-23 13:59:45 |
Judging History
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;
}
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: 0
Wrong Answer
time: 4ms
memory: 69168kb
input:
10
output:
N
result:
wrong answer 1st words differ - expected: 'Y', found: 'N'