/ SeriousOJ /

Record Detail

Time Exceeded


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 320.0 KiB
#2 Accepted 2ms 384.0 KiB
#3 Accepted 2ms 320.0 KiB
#4 Accepted 2ms 324.0 KiB
#5 Time Exceeded ≥1020ms ≥620.0 KiB
#6 Accepted 997ms 556.0 KiB
#7 Accepted 983ms 588.0 KiB
#8 Accepted 327ms 584.0 KiB

Code

#include<bits/stdc++.h>
#define ll long long 
using namespace std;

int main(){
  int t;
  cin >> t;
  while (t--){
    int n, ans = 1;
    cin >> n;
    for (int i = 2; i * i <= n; i++){
      if (n % i == 0){
        ans = max({ans, n / i, (n / (n / i))});
      }
    }
    cout << ans << endl;
  }
}

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:23:56
Judged At
2024-11-11 03:34:32
Judged By
Score
85
Total Time
≥1020ms
Peak Memory
≥620.0 KiB