結果

問題 No.414 衝動
ユーザー Maeda
提出日時 2025-03-28 16:45:44
言語 C
(gcc 13.3.0)
結果
TLE  
実行時間 -
コード長 354 bytes
コンパイル時間 311 ms
コンパイル使用メモリ 24,832 KB
実行使用メモリ 12,032 KB
最終ジャッジ日時 2025-03-28 16:45:50
合計ジャッジ時間 3,639 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 5 TLE * 1 -- * 7
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    6 |     scanf("%lld",&n);
      |     ^~~~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>
#include <stdbool.h>

void main(void) {
    long long int n = 0;
    scanf("%lld",&n);
    bool flg = false;
    for(long long int i = 2 ; i < n ; i++){
        if(n%i == 0 && n/i > 1){
            printf("%lld %lld",i , n/i);
            flg = true;
            break;
        }
    }
    if(!flg){
        printf("1 %lld",n);
    }
}
0