Submission #645674

# Submission time Handle Problem Language Result Execution time Memory
645674 2022-09-27T16:01:43 Z ElnuR_007 Chessboard (IZhO18_chessboard) C++14
0 / 100
1 ms 308 KB
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
ll n,m,k,cnt=2;
void anomalous_solve()
{
	cin>>n>>k;
	vector<ll>v;
	ll i=2;
	while(n!=1)
	{
		if(n%i==0)
		{
			v.push_back(i);
			n/=i;
		}
		else
		{
			i++;
		}
	}
	v.pop_back();
	n=v[v.size()-1];
	cnt=(n*n)/2;
	k=1;
	for(auto it:v)
	{
		k*=it;
	}
	k*=k;
	cout<<k*cnt<<"\n";
}
int main()
{
	//	freopen("INPUT.txt","r",stdin);
	//  freopen("OUTPUT.txt","w",stdout);
	
	ios_base::sync_with_stdio();
    cin.tie(NULL);
    cout.tie(NULL);
    
    ll test=1;
    //cin>>test;
    for(int pos=1;pos<=test;pos++)
    	anomalous_solve();
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 308 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 308 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -