5 条题解

  • 2
    @ 2023-8-19 20:39:27

    半夜打卡第9题

    #include <bits/stdc++.h>
    using namespace std;
    int main()
    {
        for (int i = 10; i < 100; i++)
            if ((i % 10 == 2) || (i / 10 == 2))
                cout << i << endl;
        return 0;
    }
    
    • 2
      @ 2023-8-1 16:05:36

      easy~~

      #include<bits/stdc++.h>
      using namespace std;
      int main(){
      	for(int i=10;i<=99;i++){
      		int g=i%10,s=i/10;
      		if(g==2||s==2){
      			cout<<i<<endl;
      		}
      	}
      	return 0;
      }
      
      • 1
        @ 2023-8-6 17:40:12
        #include <bits/stdc++.h>
        using namespace std;
        int main(){
            cout << "12\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n32\n42\n52\n62\n72\n82\n92";
        }
        
        
        • 1
          @ 2022-12-16 21:59:20
          #include <iostream>//hetao3097453
          using namespace std;
          int main()
          {
              for(int i = 10;i <= 99;i++)
              {
                  if(i / 10 == 2 || i % 10 == 2)
                  {
                      cout << i << endl;
                  }
              }
              return 0;
          }
          
          
          • 0
            @ 2023-10-28 19:09:44
            #include <iostream>
            using namespace std;
            int main(){
                for(int i=10;i<=99;i++)if(i/10==2||i%10==2)cout<<i<<endl;
                return 0;
            }
            
            • 1

            【入门】请输出所有的2位数中,含有数字2的整数

            信息

            ID
            697
            时间
            1000ms
            内存
            64MiB
            难度
            2
            标签
            递交数
            138
            已通过
            87
            上传者