题解 | #牛牛的快递#
牛牛的快递
https://www.nowcoder.com/practice/41b42e7b3c3547e3acf8e90c41d98270
#include <stdio.h> int main() { float a,j; char b; int count=0,i; scanf("%f %c",&a,&b); if(b=='y'){ if(a<=1){ printf("25"); } else{ j=a-1; while(j>0){ count+=1; j-=1; } int k=25+count; printf("%d",k); } } else if(b=='n'){ if(a<=1){ printf("20"); } else{ j=a-1; while(j>0){ count+=1; j-=1; } int k=20+count*1; printf("%d",k); } } return 0; }