Submission #3446

# Submission time Handle Problem Language Result Execution time Memory
3446 2013-08-31T05:51:00 Z mjy0503 Great Pow! (kriii1_G) C++
0 / 1
0 ms 1100 KB
#include <stdio.h>
#include <algorithm>
#include <string.h>
#include <vector>
#include <math.h>
int n;
int main(){
	int m,c;
	scanf("%d %d",&n,&m);
	if(m==0 || n==1)
		printf("%d\n",n);
	else{
		int i;
		c=sqrt((double)n);
		for(i=2;i<=c;i++){
			if(n%i==0) break;
		}
		if(i==c+1 && n!=2)
			printf("%d\n",n);
		else
			printf("1\n");
	}
	return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1100 KB Output is correct
2 Correct 0 ms 1100 KB Output is correct
3 Correct 0 ms 1100 KB Output is correct
4 Correct 0 ms 1100 KB Output is correct
5 Incorrect 0 ms 1100 KB Output isn't correct
6 Halted 0 ms 0 KB -