結果

問題 No.799 赤黒かーどげぇむ
ユーザー Cyberdog-しばいぬ-
提出日時 2019-04-08 18:53:41
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 260 bytes
コンパイル時間 510 ms
コンパイル使用メモリ 63,104 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-01 22:53:34
合計ジャッジ時間 1,241 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:13:18: warning: 'count' may be used uninitialized [-Wmaybe-uninitialized]
   13 |     std::cout << count << std::endl;
      |                  ^~~~~
main.cpp:4:21: note: 'count' was declared here
    4 |     int a,b,c,d,i,j,count;
      |                     ^~~~~

ソースコード

diff #

#include <iostream>

int main(){
    int a,b,c,d,i,j,count;
    std::cin >> a >> b >> c >> d;
    for(i=a;i<=b;i++){
        for(j=c;j<=d;j++){
            if(i!=j){
                count+=1;
            }
        }
    }
    std::cout << count << std::endl;
}
0