結果

問題 No.522 Make Test Cases(テストケースを作る)
ユーザー akakimidoriakakimidori
提出日時 2017-06-03 15:05:17
言語 C90
(gcc 11.4.0)
結果
AC  
実行時間 124 ms / 2,000 ms
コード長 237 bytes
コンパイル時間 491 ms
コンパイル使用メモリ 20,684 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-22 02:58:32
合計ジャッジ時間 2,431 ms
ジャッジサーバーID
(参考情報)
judge12 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include<stdio.h>

void run(void){
  int n;
  scanf("%d",&n);
  int a,b,c;
  for(a=1;a<=n/3;a++){
    for(b=a;b<=(n-a)/2;b++){
      c=n-a-b;
      printf("%d %d %d\n",a,b,c);
    }
  }
  return;
}

int main(void){
  run();
  return 0;
}
0