5月27日:1009:带余除法

方法一
#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
long long a,b;
cin>>a>>b;
cout<<a/b<<' '<<a%b<<endl;
return 0;
}
方法二
#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
long long a,b,c,d;
cin>>a>>b;
c=a/b;
d=a%b;
cout<<c<<' '<<d<<endl;
return 0;
}

posted @ 2022-06-05 20:10  一二三亖靐齉齾龖龗  阅读(42)  评论(0)    收藏  举报