結果

問題 No.542 1円玉と5円玉
ユーザー YukiDaruma
提出日時 2017-07-14 22:39:41
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 373 bytes
コンパイル時間 1,583 ms
コンパイル使用メモリ 167,204 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-07 23:16:25
合計ジャッジ時間 2,223 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main( int argc, char *argv[] )
{
int i;
int A;
int B;
int N;

	ios::sync_with_stdio( false );
	cin.tie( 0 );

	cin >> A;
	cin >> B;
	N = A + 5 * B;
	if( A >= 4 )
	{
		for( i = 1; i <= N; i++ )
			cout << i << endl;
	}
	else
	{
		for( i = 1; i <= N; i++ )
		{
			if( i % 5 <= A ) cout << i << endl;
		}
	}

	return 0;
}


0