题解 | #零钱兑换#
零钱兑换
https://ac.nowcoder.com/acm/problem/22197
#include<stdio.h>
int n;
int main(){
scanf("%d",&n);
int c=n/5;
for(int i=0;i<=n/5;i++) c+=(n-5*i)/2;
printf("%d",++c);
}
题解 文章被收录于专栏
https://ayx.moefox.tech/
零钱兑换
https://ac.nowcoder.com/acm/problem/22197
#include<stdio.h>
int n;
int main(){
scanf("%d",&n);
int c=n/5;
for(int i=0;i<=n/5;i++) c+=(n-5*i)/2;
printf("%d",++c);
}
https://ayx.moefox.tech/
相关推荐