P5709 [深基2.习6] Apples Prologue / 苹果和虫子
#include <cstdio>
#include <algorithm>
using namespace std;
int main()
{
int m, t, s, ans;
scanf("%d%d%d", &m, &t, &s);
if (t == 0) ans = 0;
else ans = m - (s + t - 1) / t;
printf("%d\n", max(ans, 0));
return 0;
}
P5710 [深基3.例2] 数的性质
#include <cstdio>
int main()
{
int x;
scanf("%d", &x);
int p1 = x % 2 == 0;
int p2 = x > 4 && x <= 12;
printf("%d %d %d %d\n", p1 && p2, p1 || p2, p1 ^ p2, !p1 and !p2);
return 0;
}
标签:1.2,参考,int,代码,d%,ans,include,scanf
From: https://www.cnblogs.com/ronchen/p/17576652.html