Wrong Answer
Code
#include <stdio.h>
#include <math.h>
int main() {
int T;
scanf("%d", &T);
for (int i = 0; i < T; i++) {
int N;
scanf("%d", &N);
int max_partition = sqrt(N);
for (int j = max_partition; j >= 2; j--) {
if (N % j == 0) {
printf("%d\n", j);
break;
}
}
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1052 Yet Another Array Partition
- Contest
- Brain Booster #3
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2024-05-06 15:52:41
- Judged At
- 2024-11-11 03:33:46
- Judged By
- Score
- 0
- Total Time
- 1ms
- Peak Memory
- 320.0 KiB