結果

問題 No.799 赤黒かーどげぇむ
ユーザー wanjing8
提出日時 2019-06-19 03:16:07
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 205 bytes
コンパイル時間 123 ms
コンパイル使用メモリ 22,656 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-30 07:58:09
合計ジャッジ時間 825 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 3 WA * 17
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:6:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    6 |   scanf("%d %d %d %d",&a,&b,&c,&d);
      |   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>

int main(void){
  int a,b,c,d,ans;
  ans=0;
  scanf("%d %d %d %d",&a,&b,&c,&d);
  for(;a<=b;a++){
    for(;c<=d;c++){
      if(a!=c)ans++;
    }
  }
  printf("%d\n",ans);
  return 0;
}
0