結果

問題 No.799 赤黒かーどげぇむ
ユーザー sasa
提出日時 2025-03-14 14:14:46
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 240 bytes
コンパイル時間 447 ms
コンパイル使用メモリ 27,392 KB
実行使用メモリ 7,324 KB
最終ジャッジ日時 2025-03-14 14:14:47
合計ジャッジ時間 1,171 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:6:14: 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(){
	// 入力された値
	int A,B,C,D;
	scanf("%d%d%d%d",&A,&B,&C,&D);
	
	int count = 0;
	for(int i = A;i <= B;i ++){
		for(int j = C;j <= D;j ++){
			if(i != j){
				count++;
			}
		}
	}
	printf("%d",count);
}
0