結果
| 問題 | No.99 ジャンピング駒 |
| コンテスト | |
| ユーザー |
testestest
|
| 提出日時 | 2015-08-05 18:07:01 |
| 言語 | C90 (gcc 12.4.0) |
| 結果 |
AC
|
| 実行時間 | 16 ms / 5,000 ms |
| コード長 | 133 bytes |
| 記録 | |
| コンパイル時間 | 175 ms |
| コンパイル使用メモリ | 28,868 KB |
| 最終ジャッジ日時 | 2026-02-23 18:57:42 |
|
ジャッジサーバーID (参考情報) |
judge2 / 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);
| ^~~~~~~~~~~~~~
ソースコード
#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;
}
testestest