結果

問題 No.542 1円玉と5円玉
ユーザー michonz4michonz4
提出日時 2019-12-25 17:20:16
言語 C
(gcc 12.3.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 262 bytes
コンパイル時間 339 ms
コンパイル使用メモリ 29,632 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-25 10:44:48
合計ジャッジ時間 1,175 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,348 KB
testcase_01 AC 1 ms
4,348 KB
testcase_02 AC 1 ms
4,348 KB
testcase_03 AC 1 ms
4,348 KB
testcase_04 AC 1 ms
4,348 KB
testcase_05 AC 1 ms
4,348 KB
testcase_06 AC 1 ms
4,348 KB
testcase_07 AC 1 ms
4,348 KB
testcase_08 AC 1 ms
4,348 KB
testcase_09 AC 1 ms
4,348 KB
testcase_10 AC 1 ms
4,348 KB
testcase_11 AC 1 ms
4,348 KB
testcase_12 AC 1 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>

int main() {
  int a, b, i, j, arr[1000]={0};
  scanf("%d %d", &a, &b);

  for (i=0; i<=b; i++) {
    for (j=0; j<=a; j++) {
      arr[i*5+j*1]++;
    }
  }

  for (i=1; i<=a+b*5; i++) {
    if (arr[i]!=0) printf("%d\n", i);
  }
  return 0;
}
0