题解 | #小乐乐排电梯#
小乐乐排电梯
http://www.nowcoder.com/practice/0f855c7642b74cccb3c2366bb7732d2a
#include <stdio.h>
int TIME(int x)
{
if (x < 12)
{
return 2;
}
else
return (x / 12) * 4 + 2;
}
int main()
{
int n = 0;
scanf("%d", &n);
int ret = TIME(n);
printf("%d\n", ret);
return 0;
}