7 solutions

  • 5
    @ 2024-7-8 20:16:39
    #include<bits/stdc++.h>
    #define int long long
    using namespace std;
    int a,b;
    signed main(){
    	cin>>a>>b;
    	cout<<a/b<<" "<<a%b<<endl;
    	return 0;
    }
    
    • 2
      @ 2023-9-16 16:51:47
      #include<bits/stdc++.h>
      #define int long long
      using namespace std;
      int a,b;
      signed main(){
      	cin>>a>>b;
      	cout<<a/b<<" "<<a%b<<endl;
      	return 0;
      }
      
      • 1
        @ 2024-1-25 9:03:40
        #include<bits/stdc++.h>
        using namespace std;
        int a,b;
        int main(){
        	cin>>a>>b;
        	cout<<a/b<<' '<<a%b<<"\n";
        	return 0;
        }
        
        • 1
          @ 2023-10-30 16:46:30
          #include <iostream>
          #include <cstdio>
          #include <iomanip>
          #include <cmath>
          using namespace std;
          int main(){
          	int a , b , c;
          	cin >> a >> b;
          	double r;
          	r = a / b;
          	c = a % b;
          	cout << int(r) << " " << int(c) << endl;
          	return 0;
          }
          
          • 1
            @ 2023-9-17 11:37:42
            #include <bits/stdc++.h>
            using namespace std;
            signed main(){
            	int a,b;
            	cin >> a >> b;
            	printf("%d %d",a / b,a % b);
            	return 0;
            }
            
            • 0
              @ 2023-11-24 21:28:30
              #include<iostream>
              using namespace std;
              int main(){
                  int x,y;
                  cin>>x>>y;
                  int n=x/y;
                  int s=x%y;
                  cout<<n<<" "<<s;
                  return 0;
              }
              
              • -4
                @ 2024-7-8 20:06:44
                #include<iostream>
                #include<iomanip> 
                using namespace std;
                int main() {
                	int a,b,c,d,e,f;
                	cin>>a>>b;
                	c=a/b;
                	d=int(c);
                	e=b*d;
                	f=a-e;
                	cout<<d<<" "<<f;
                	return 0;
                } 
                
                • 1

                Information

                ID
                495
                Time
                1000ms
                Memory
                256MiB
                Difficulty
                1
                Tags
                # Submissions
                170
                Accepted
                112
                Uploaded By