4 solutions

  • 1
    @ 2025-5-1 10:12:40

    #include <bits/stdc++.h> using namespace std; int main() { int x,y; cin>>x>>y; int s=(y-x); if(s<0) s=0; int ans=(s+9)/10; cout<<ans; return 0; }

    • 1
      @ 2025-3-17 21:33:24
      #include <bits/stdc++.h>
      using namespace std;
      int main()
      {
      	int x,y;
          cin>>x>>y;
          int s=(y-x);
          if(s<0) s=0;
      	int ans=(s+9)/10;
      	cout<<ans;
      	return 0; 
      }
      
      • -1
        @ 2025-4-25 19:24:04
        #include<bits/stdc++.h>
        using namespace std;
        int main()
        {
        	int x,y;
        	cin>>x>>y;
        	if(x>=y)
        	{
        		cout<<0;
        		return 0;
        	}
        	int b=y-x;
        	int t=b/10;
        	if(b%10!=0)
        	{
        		t++;
        	}
        	cout<<t; 
            return 0;
        }
        
        
        • -1
          @ 2025-4-12 10:14:44
          #include<bits/stdc++.h>
          using namespace std;
          int main()
          {
          	int a,b,c;
          	cin>>a>>b;
          	
          	if(b>a)
          	{
          		c=b-a; 
          		c=b/10;
          	}
          	if(b%10>0)
          	{
          		c+=1;
          	}
          	cout<<c;
          
          	return 0;
          }
          
          • 1

          Information

          ID
          2318
          Time
          1000ms
          Memory
          256MiB
          Difficulty
          1
          Tags
          (None)
          # Submissions
          91
          Accepted
          31
          Uploaded By