結果

問題 No.1453 手助け
ユーザー katoru_perfperf
提出日時 2021-04-02 19:57:56
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 366 bytes
コンパイル時間 560 ms
コンパイル使用メモリ 66,916 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-12-23 16:20:30
合計ジャッジ時間 1,585 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10 WA * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <stdio.h>

using namespace std;

int main() {
	int A, B, C, D, E;
	cin >> A >> B >> C >> D >> E;

	int num = A * (B - C);

	int step = num / 10;

	long long ans = 0;
	for (int i = 0; i < step; i++) {
		ans += max(10 * (D - E * i), 10*(D%E));
	}

	ans += (num % 10) * max((D - E * step), D % E);

	cout << ans << endl;
}
0