#20002: 1226562


joe951007 (10842510)

School : 臺北市私立延平高級中學
ID : 102958
IP address : [203.72.178.252]
Last Login :
2020-09-29 17:02:53
d827. 買鉛筆 -- 板橋高中教學題 | From: [203.72.178.252] | Post Date : 2019-11-15 14:30

#include <iostream>
using namespace std;

int main()
{
int n,money;
while(cin>>n)
{
if(n<=10){
money=5*n;
cout<<money<<endl;
}
else{
money=n/12*50+n%12*5;
cout<<money<<endl;
}
}
return 0;
}
 
ZeroJudge Forum