結果

問題 No.388 階段 (1)
ユーザー wat143
提出日時 2017-02-26 15:06:04
言語 C90
(gcc 12.3.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 257 bytes
コンパイル時間 134 ms
コンパイル使用メモリ 20,224 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-11 16:38:55
合計ジャッジ時間 842 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 12
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:7:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    7 |   scanf("%d", &S);
      |   ^~~~~~~~~~~~~~~
main.c:10:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   10 |   scanf("%d", &F);
      |   ^~~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>

int main(void)
{
  int S,F;

  scanf("%d", &S);  
  if(S > 456 || S < 0)
    printf("Error:Out of scope\n");
  scanf("%d", &F);
  if(F > 123 || F < 1)
    printf("Error:Out of scope\n");
  
  printf("%d\n", (S/F) + 1);
  
  return(0);
}
0