結果

問題 No.522 Make Test Cases(テストケースを作る)
ユーザー butsurizukibutsurizuki
提出日時 2016-11-02 17:37:01
言語 C90
(gcc 11.4.0)
結果
AC  
実行時間 141 ms / 2,000 ms
コード長 230 bytes
コンパイル時間 203 ms
コンパイル使用メモリ 20,608 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-21 23:31:54
合計ジャッジ時間 2,477 ms
ジャッジサーバーID
(参考情報)
judge10 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 6 ms
4,348 KB
testcase_02 AC 4 ms
4,348 KB
testcase_03 AC 11 ms
4,348 KB
testcase_04 AC 0 ms
4,348 KB
testcase_05 AC 0 ms
4,348 KB
testcase_06 AC 1 ms
4,348 KB
testcase_07 AC 0 ms
4,348 KB
testcase_08 AC 1 ms
4,348 KB
testcase_09 AC 7 ms
4,348 KB
testcase_10 AC 141 ms
4,348 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:5:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    5 |         scanf("%d",&n);
      |         ^~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>

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