結果

問題 No.99 ジャンピング駒
ユーザー 👑 testestest
提出日時 2015-08-05 18:07:01
言語 C90
(gcc 12.3.0)
結果
AC  
実行時間 14 ms / 5,000 ms
コード長 133 bytes
コンパイル時間 95 ms
コンパイル使用メモリ 20,352 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-18 03:31:09
合計ジャッジ時間 673 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:4:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    4 | scanf("%d",&n);
      | ^~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>
int main(){
int a,n,s=0;
scanf("%d",&n);
while(n--)scanf("%d",&a)&&a%2?s++:s--;
printf("%d",s>0?s:-s);
return 0;
}
0