Description
小瑜是个爱吃糖果的馋鬼,天天嚷着要爸爸买糖果,可是爸爸很忙,哪有时间啊,于是就让小瑜自己去了,糖果3角钱一块,爸爸给小瑜n元钱,请你告诉小瑜最多能买几块糖,还剩几角钱?
Input
输入爸爸给小瑜的钱n元,n为整数。
Output
小瑜最多能买回的糖块数以及剩下的钱(单位为:角),用空格分隔。
Sample
Input
2
Output
6 2
#include <stdio.h>
#include <stdlib.h>
int main() {
int a, b, c, d;
scanf("%d", &a);
b = a*10 / 3;
c = 3 * b;
d = a*10 - c;
printf("%d %d\n", b, d);
return 0;
}