题解 | #小乐乐排电梯#
小乐乐排电梯
https://www.nowcoder.com/practice/0f855c7642b74cccb3c2366bb7732d2a
#include <stdio.h>
int main()
{
int a = 0;
int b = 0;
while (scanf("%d ", &a) != EOF)
{
if(a>=12)
{
b = (a/12)*4+2;//a除以12取整
}
else
{
b = 2;
}
printf("%d",b);
}
return 0;
}
OPPO公司福利 1210人发布