제출 #1367927

#제출 시각아이디문제언어결과실행 시간메모리
1367927jackhui100101Hack (APIO25_hack)C++20
25 / 100
50 ms428 KiB
#include "hack.h"
#include <bits/stdc++.h>
using namespace std;
int hack(){
    int N = 1e6;
    for (int i = N; i >= 2; i -= 2){
        int r = collisions({1, i, i + 1});
        if (r){
            int r2 = collisions({1, i});
            if (r2) i--;
            for (int j = 2; j <= i; j++){
                if (i % j == 0){
                    int r3 = collisions({1, j + 1});
                    if (r3) return j;
                }
            }
        }
    }
}

컴파일 시 표준 에러 (stderr) 메시지

hack.cpp: In function 'int hack()':
hack.cpp:19:1: warning: control reaches end of non-void function [-Wreturn-type]
   19 | }
      | ^
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…