1 solutions

  • 0
    @ 2025-12-3 11:04:44

    C++ :

       #include<bits/stdc++.h>
    using namespace std;
     
    int n; 
     
    int main()
    {
        int a=6;
        cin>>n;
        for(int i=0;i<n;i++)
        {
            for(int j=0;;j++)
            {
                a++;
                if(a%10==7) break;
            }
             
        }
        cout<<a<<" ";
        return 0;
    }
    
    • @ 2026-2-11 19:28:02

      老师的答案太复杂了,看我的吧:

      #include<bits/stdc++.h>
      using namespace std;
      int main(){
          int n;
          cin>>n;
          cout<<n*10-3;
          return 0;
      }
      
  • 1

Information

ID
809
Time
1000ms
Memory
128MiB
Difficulty
9
Tags
(None)
# Submissions
9
Accepted
7
Uploaded By