11 条题解

  • 4
    @ 2025-2-28 12:38:45
    a,b,c=map(int,input().split())
    m=0
    i=0
    while m<10:
        i+=1
        if i%a==1 and i%b==1 and i%c==1:
            print(i,end=" ")
            m+=1
    
    • 1
      @ 2023-12-4 9:49:47
      a,b,c=map(int,input().split())
      s=0
      m=0
      while s<10:
          m+=1
          if m%a==1 and m%b==1 and m%c==1:
             s+=1
             print(m,end=' ')
      
      • 0
        @ 2025-4-19 17:42:22

        #include <bits/stdc++.h>

        using namespace std; int a,b,c,d=0; int main() { cin>>a>>b>>c; for(int i=1;1<=10000;i++){ if(i%a1 && i%b1 && i%c1){ cout<<i<<" "; d=d+1; }if(d10){break;} } return 0; }

        • 0
          @ 2025-3-16 17:03:40
          a,b,c=map(int,input().split())
          m=0
          i=0
          while m<10:
              i+=1
              if i%a==1 and i%b==1 and i%c==1:
                  print(i,end=" ")
                  m+=1
          
          • 0
            @ 2022-7-16 15:11:53
            #include<bits/stdc++.h>
            using namespace std;
             
            void p(int a,int b,int c)
            {
            	int sum=0;
            	for(int i=1;;i++)
            	{
            		if(i%a==1&&i%b==1&&i%c==1)
            		{
            			cout<<i<<" ";
            			sum++;
            		}
            		if(sum==10)break;
            		
            	}
            }
            int main() {
            	int a,b,c;
            	cin>>a>>b>>c;
            	p(a,b,c);
            }
            

            加那么多9干嘛.jpg

            • -1
              @ 2022-7-11 16:15:09

              多加几个9.jpg

              #include<bits/stdc++.h>
              using namespace std;
              int main()
              {
              	int a,b,c,sum=0;
              	cin>>a>>b>>c;
              	for(int i=1;i<=99999999;i++)
              	{
              		if(i%a==1&&i%b==1&&i%c==1)
              		{
              			cout<<i<<" ";
              			sum++;
              
              		}
              		if(sum==10)break;
              	}
              }
              
              • -2
                @ 2025-3-11 14:32:36

                #include <bits/stdc++.h>

                using namespace std;

                int main() {

                int x, y, z;
                cin >> x >> y >> z;
                long i = 1, sum = 0;
                
                while (1) {
                    if (i % x == 1 && i % y == 1 && i % z == 1) {
                        cout << i << " ";
                        sum += 1;
                    }
                    if (sum == 10) {
                        return 0;
                    }
                    i += 1;
                }
                
                return 0;
                

                }

                //高一作业??

              • -2
                @ 2025-3-9 16:44:43

                a,b,c=map(int,input().split()) m=0 i=0 while m<10: i+=1 if i%a1 and i%b1 and i%c==1: print(i,end=" ") m+=1

                • -2
                  @ 2023-8-24 21:24:22

                  a,b,c=map(int,input().split()) s=0 m=0 while s<10: if m%a1 and m%b1 and m%c==1: print(m,end=' ') s+=1 m+=1

                  • -2
                    @ 2023-7-18 14:07:40

                    `#include<bits/stdc++.h> using namespace std; int main()

                    { int a,b,c,s=0; cin>>a>>b>>c;

                    for(int i=0;i<=100000000;i++){
                        if(i%a==1&&i%b==1&&i%c==1){
                            cout<<i<<" ";s+=1;
                        }
                        if(s==10)break;
                    }
                    

                    }`

                    • -2
                      @ 2022-11-23 10:51:05

                      本题不用卡大常数,用vector判断长度即可 STL大法好()

                      #include <bits/stdc++.h>
                      using namespace std;
                      
                      
                      vector<int> ans;
                      
                      int main()
                      {
                      	int a,b,c;
                      	cin >> a >> b >> c;
                      	int i = 1;
                      	while(ans.size()<10)
                      	{
                      		if(i%a == 1 && i%b == 1 && i%c == 1) ans.push_back(i);
                      		i+=1; 
                      	}
                      	for(auto x:ans) cout << x << " ";
                      	return 0;
                      }
                      
                      
                      • 1

                      信息

                      ID
                      72
                      时间
                      10000ms
                      内存
                      128MiB
                      难度
                      5
                      标签
                      递交数
                      1519
                      已通过
                      532
                      上传者