結果

問題 No.312 置換処理
コンテスト
ユーザー kuuso1
提出日時 2015-12-05 03:38:35
言語 C90(gcc12)
(gcc 12.4.0)
コンパイル:
gcc-12 -O2 -std=c90 -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
RE  
実行時間 -
コード長 140 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 208 ms
コンパイル使用メモリ 29,384 KB
最終ジャッジ日時 2026-02-23 19:57:12
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other RE * 45
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:2:91: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long long int’ [-Wformat=]
    2 | int main(){long long int u,i;scanf("%lld",&u);for(i=3;i*i<=u;i++)if(u%i<1)return printf("%d",i);printf("%lld",u%2?u:u/2);}
      |                                                                                          ~^  ~
      |                                                                                           |  |
      |                                                                                           |  long long int
      |                                                                                           int
      |                                                                                          %lld
main.c:2:30: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    2 | int main(){long long int u,i;scanf("%lld",&u);for(i=3;i*i<=u;i++)if(u%i<1)return printf("%d",i);printf("%lld",u%2?u:u/2);}
      |                              ^~~~~~~~~~~~~~~~

ソースコード

diff #
raw source code

#include<stdio.h>
int main(){long long int u,i;scanf("%lld",&u);for(i=3;i*i<=u;i++)if(u%i<1)return printf("%d",i);printf("%lld",u%2?u:u/2);}
0