結果
問題 | No.312 置換処理 |
ユーザー |
![]() |
提出日時 | 2015-12-05 03:38:35 |
言語 | C90 (gcc 12.3.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 140 bytes |
コンパイル時間 | 367 ms |
コンパイル使用メモリ | 21,248 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-14 14:18:42 |
合計ジャッジ時間 | 1,618 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 WA * 1 RE * 30 |
コンパイルメッセージ
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);} | ^~~~~~~~~~~~~~~~
ソースコード
#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);}