5 条题解

  • 3
    @ 2023-8-19 21:01:59

    半夜打卡第15题

    #include <bits/stdc++.h>
    using namespace std;
    int main()
    {
        int n;
        cin >> n;
        for (int i = 5; i <= n; i++) if ((i % 10 == 5) || (i % 10 == 8)) cout << i << endl;
        return 0;
    }
    
    • 2
      @ 2023-1-1 15:19:13
      #include <iostream>//hetao3097453
      using namespace std;
      int main()
      {
          int n;
          cin >> n;
          for(int i = 1;i <= n;i++)
          {
              if(i % 10 == 5 || i % 10 == 8)
              {
                  cout << i << endl;
              }
          }
          return 0;
      }
      
      
      • 1
        @ 2023-7-29 18:28:34
        #include <bits/stdc++.h>
        using namespace std;
        int main(){
            int n;
            cin >> n;
            for (int i = 1; i <= n; i++)if (i % 10 == 5 || i % 10 == 8) cout << i << endl;
        }
        
        • 1
          @ 2022-12-28 12:06:25
          #include <bits/stdc++.h>
          using namespace std;
          int main()
          {
              int n;
              cin >> n;
              for (int i = 1; i <= n; i++)
              {
                  if (i % 10 == 5 || i % 10 == 8)
                  {
                      cout << i << endl;
                  }
              }
              return 0;
          }
          
          • 0
            @ 2023-10-4 19:41:49
            #include<bits/stdc++.h>
            using namespace std;
            int n;
            int main()
            {
                cin>>n;
                for(int i=1;i<=n;i++)
                {
                    if(i%10==5||i%10==8)
                    {
                        cout<<i<<endl;
                    }
                }
                return 0;
            }
            
            • 1

            【入门】输出个位为5或者个位为8数

            信息

            ID
            718
            时间
            1000ms
            内存
            128MiB
            难度
            1
            标签
            递交数
            97
            已通过
            78
            上传者