7 条题解

  • 2
    @ 2022-12-17 13:56:11
    #include <bits/stdc++.h>
    using namespace std;
    int main()
    {
        int x;
        cin >> x;
        if (x % 10 == 0)
        {
            cout << x * 0.8;
        }
        else
        {
            cout << x;
        }
        return 0;
    }
    
    • 1
      @ 2024-5-6 21:11:15
      #include <bits/stdc++.h>
      using namespace std;
      int main()
      {
          int n;
          cin>>n;
          if (n%10==0)
          {
              cout<<n*0.8;
          }
          else
          {
              cout<<n;
          }
          return 0;
      }//AC
      
      
      • 1
        @ 2023-3-20 21:55:14
        #include <iostream>
        using namespace std;
        int main()
        {
            int n;
            cin >> n;
            if(n % 10 == 0)
            {
                cout << n * 0.8;
            }
            else
            {
                cout << n;
            }
            return 0;
        }
        
        • 0
          @ 2022-10-23 20:36:36
          #include <iostream>
          using namespace std;
          int main()
          {
              int x;
              cin>>x;
              if(x % 10 == 0)
              {
                  cout << x * 0.8;
              }
              else
              {
                  cout << x;
              }
              return 0;
          }
          //非常简单
          
          • -1
            @ 2023-9-18 21:58:55
            #include<bits/stdc++.h>
            using namespace std;
            int main()
            {
                int c;
                cin >> c;
                if(c % 10 == 0)
                {
                    c *= 0.8;
                    cout <<c;
                }
                else
                {
                    cout << c;
                }
                return 0;
            }
            

            A

            • -1
              @ 2023-5-31 7:26:10
              #include <bits/stdc++.h>
              using namespace std;
              int n;
              int main()
              {
                  cin >> n;
                  if (n % 10 == 0)
                  {
                      cout << 0.8 * n;
                  }
                  else
                  {
                      cout << n;
                  }
                  return 0;
              }
              
              • -1
                @ 2023-4-10 20:45:57

                然而我发现这里好像不用用double()

                #include<bits/stdc++.h>
                using namespace std;
                int main()
                {
                    int x;
                    cin>>x;
                    double y=x;
                    if (x%10==0)
                        y*=0.8;
                    cout<<y;
                    return 0;
                }
                • 1

                信息

                ID
                866
                时间
                1000ms
                内存
                16MiB
                难度
                1
                标签
                递交数
                100
                已通过
                71
                上传者