3 条题解
-
1
冯晟哲 LV 10 @ 1 年前
-
04 年前@
a=int(input())
b=a//100
c=a%100
d=(b*88)+c
print(d) -
04 年前@
- 1
信息
- ID
- 1023
- 难度
- 5
- 分类
- (无)
- 标签
- (无)
- 递交数
- 93
- 已通过
- 35
- 通过率
- 38%
- 上传者
#include <iostream>
using namespace std;
int main(){
int price/*消费金额*/,amount/*使用代金券的数量*/,cost/*实际花费*/;
cin>>price;
if(price>=100){
amount=price%100==0?price/100:static_cast<int>(price/100);
cost=amount*88+price-100*amount;
}else
cost=price;
cout<<cost<<endl;
return 0;
}