結果

問題 No.1453 手助け
ユーザー katoru_perfperfkatoru_perfperf
提出日時 2021-04-02 19:57:56
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 366 bytes
コンパイル時間 565 ms
コンパイル使用メモリ 67,480 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-08-25 04:05:16
合計ジャッジ時間 3,134 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 1 ms
4,376 KB
testcase_06 WA -
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 2 ms
4,376 KB
testcase_09 AC 2 ms
4,376 KB
testcase_10 WA -
testcase_11 AC 2 ms
4,376 KB
testcase_12 WA -
testcase_13 AC 2 ms
4,380 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 1 ms
4,380 KB
testcase_17 AC 2 ms
4,380 KB
testcase_18 WA -
testcase_19 AC 2 ms
4,376 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 1 ms
4,380 KB
testcase_23 AC 2 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

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