結果

問題 No.99 ジャンピング駒
ユーザー umashikaumashika
提出日時 2016-02-24 22:03:32
言語 C90
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 228 bytes
コンパイル時間 961 ms
コンパイル使用メモリ 20,952 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-23 19:41:38
合計ジャッジ時間 931 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:7:11: warning: format ‘%d’ expects argument of type ‘int *’, but argument 2 has type ‘long int *’ [-Wformat=]
    7 |   scanf("%d",&n);
      |          ~^  ~~
      |           |  |
      |           |  long int *
      |           int *
      |          %ld
main.c:9:13: warning: format ‘%d’ expects argument of type ‘int *’, but argument 2 has type ‘long int *’ [-Wformat=]
    9 |     scanf("%d",&x[i]);
      |            ~^  ~~~~~
      |             |  |
      |             |  long int *
      |             int *
      |            %ld
main.c:7:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    7 |   scanf("%d",&n);
      |   ^~~~~~~~~~~~~~
main.c:9:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    9 |     scanf("%d",&x[i]);
      |     ^~~~~~~~~~~~~~~~~

ソースコード

diff #

#include<stdio.h>
int main()
{
  long int n;
  long int x[100000];
  long int i;
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d",&x[i]);
  }
  if(n%2==0){
    printf("1\n");
  }
  else{
    printf("0\n");
  }
  return 0;
}
0