Type: Default 1000ms 256MiB

疯狂大减价

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

疯狂大减价

题目背景

gza 去超市,超市大减价!

题目描述

超市提供了两张优惠券:

  • 第一张:满 100100 元减 2020 元;
  • 第二张:满 200200 元减 5050 元。

gza 可以以任意顺序使用优惠券。先使用的优惠券会对后使用的优惠券产生影响。例如,购买了 210210 元的商品,先使用第一张优惠券后,价格会变为 190190 元,此时,无法使用第二张优惠券。

给定初始需支付金额 nn,求最终 gza 需要支付的金额的最小值。

输入格式

一行一个整数 nn,代表需要支付的商品总价。

输出格式

一行一个整数,表示答案。

输入输出样例 #1

输入 #1

370

输出 #1

300

输入输出样例 #2

输入 #2

120

输出 #2

100

说明/提示

数据规模与约定

对于 100%100\% 的数据,1≤n≤10001 \leq n \leq 1000。

校赛新手热身(一)

Not Attended
Status
Done
Rule
XCPC
Problem
8
Start at
2026-10-31 14:30
End at
2026-11-6 20:30
Duration
150 hour(s)
Host
Partic.
77