2 条题解

  • 1
    @ 2024-7-15 21:42:08

    题目分析:

    本题是一个经典的数学问题。题目所求的数字除以 3322,除以 5533,除以 7722,那么经过简单的计算可知符合题意的数字中,最小的一个是 2323,且由于 1051053,5,73,5,7 的最小公倍数,所以每隔 105105 就会有一个答案。

    代码实现:

    #include<cstdio>
    int main(){
    	long long n,a=23;
    	scanf("%lld",&n);
    	while(a<n){
    		printf("%lld\n",a);
    		a+=105;
    	}
    	return 0;
    }
    

    记得给五星好评哦喵~ 谢谢客官啦~

    • -1
      @ 2024-5-12 14:47:39

      #include<bits/stdc++.h> using namespace std; int main(){ int a,b,c,d,n,m,i,s; cin>>a; for(b=1;b<=a;b++){ if(b%32 and b%53 and b%7==2){ cout<<b<<endl; } } return 0;

      • 1

      信息

      ID
      2071
      时间
      1000ms
      内存
      256MiB
      难度
      5
      标签
      递交数
      79
      已通过
      29
      上传者