首页 > 其他分享 >19th

19th

时间:2023-05-12 19:57:52浏览次数:34  
标签:ld sum 19th && printf i%

 

源代码

#include <iostream>
using namespace std;
int main(){
long n,sum,i;
while(scanf("%ld",&n)!=EOF){
sum=0;
cout<<n<<endl;
for(i=7;i<=n;i++){
if(i%7==0&&i%6==5&&i%5==4&&i%5==4&&i%3==2)
{
sum++;
printf("%ld\n",i);
}
}
printf("在1~n之间 有 %ld个符合",sum);
}
}

标签:ld,sum,19th,&&,printf,i%
From: https://www.cnblogs.com/wcy1111/p/17396153.html

相关文章

  • 18th-19th
    [1]二叉树基本概念(三种遍历)+不用递归模式的遍历:4种+层次遍历法(用queue来帮助实现)[2]queue:https://www.weixueyuan.net/a/hbkjae.html[3]hashMaphttps://blog.cs......
  • 19th 2022/7/16 模拟赛总结11
    这次哈,随便一打不理解的一点,就是随便一打,然后排到前10T1是很水的模拟T2是一道数据结构贪心题,此时才发现欠缺的贪心技巧T3是一道数学式子化简,挺简单,但注意计算时爆long......