結果

問題 No.542 1円玉と5円玉
ユーザー funakoshifunakoshi
提出日時 2019-08-29 17:45:31
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 602 bytes
コンパイル時間 268 ms
コンパイル使用メモリ 30,848 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-28 21:32:07
合計ジャッジ時間 872 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <math.h>
int main(void)
{
    int itien,goen,total=0,k=0;
    int list[20000]={0};
    scanf("%d %d",&itien,&goen);
    for(int i=0;i<itien;i++)
    {
        total+=1;
        list[total]=1;
    }
    total=0;
    for(int i=0;i<goen;i++)
    {
        total+=5;
        list[total]=1;
        for(int i=0;i<itien;i++)
        {
            total+=1;
            list[total]=1;
        }
    }
    for(int i=0;i<10500;i++)
    {
        if(list[i]>0)
        {
            printf("%d\n",i);
        }
    }
}
    
0