13 条题解
-
1吴曼宁 (slz吴曼宁) LV 5 @ 2023-11-7 17:39:33
#include <stack> #include <iostream> #include <iomanip> #include <string.h> #include <algorithm> using namespace std; int main() { int n,m,a,b,c; cin>>n>>m; a=n/m; c=a*m; b=n-c; cout<<b<<" "<<a; }
-
12023-1-23 15:01:47@
#include<iostream> using namespace std; int main(){ int a,b; cin>>a>>b; cout<<a%b<<" "<<a/b; return 0; }
求赞
-
02024-11-6 18:38:11@
#include <iostream> using namespace std; int main() { int a,b; cin>>a>>b; cout<<a%b<<" "<<a/b; return 0; }
-
02024-9-27 18:45:57@
#include<bits/stdc++.h> const int N=1e5+10; using namespace std; int main(){ int a,b,c;//a表示跳绳数,b表示减去数 cin>>a>>c; if(a%c==0){ cout<<a/c; } if(a%c!=0){ b=a%c; a=a-b; cout<<b<<" "<<a/c; } if(a==0&&b==0) cout<<"0"; return 0; }
然后,你错了😄
-
02024-3-30 17:28:34@
#include <iostream> using namespace std; int main() { int n,m,c,d; cin >>n>>m; c = n % m; d = (n - c) / m; cout << c << ' ' << d << endl; }
-
02024-3-26 22:34:55@
#include <stdio.h> #include <iostream> using namespace std; int main() { int a,b cin>>a>>b cout<<a%b<<" "<<a/b;
return 0;
}
-
02024-3-26 22:34:40@
#include <stdio.h> #include <iostream> using namespace std; int main() { int a,b; cin>>a>>b; cout<<a%b<<" "<<a/b;
return 0;
}
-
02023-10-16 16:26:28@
#include<cstdio> #include<iostream> #include<cmath> #include<iomanip> using namespace std; int main(){ long long m,n; cin>>n>>m; cout<<n%m<<" "<<n/m; return 0; }
-
02023-3-29 16:32:57@
#include <iostream> using namespace std; int main() { int a,b,c,d; cin>>a>>b; c=a%b; d=(a-c)/b; cout<<c<<" "<<d; }
-
02022-11-14 17:55:20@
#include <iostream> using namespace std;int main(){int n,m,a,b,c;cin>>n>>m;a=n/m;c=a*m;b=n-c;cout<<b<<" "<<a;}
-
02022-8-2 9:25:07@
先用数学的方式理解
#include <stack> #include <iostream> #include <iomanip> #include <string.h> #include <algorithm> using namespace std; int main() { int n,m,a,b,c; cin>>n>>m; a=n/m; c=a*m; b=n-c; cout<<b<<" "<<a; }
-
-72022-7-1 21:03:14@
#include <stdio.h>
#include <iostream>
using namespace std;
int main()
{
int a,b; cin>> a >> b ; cout<< a % b << " " << (a - a % b) /b;
}
-
-122022-1-8 10:54:52@
#include <stack> #include <iostream> #include <iomanip> #include <string.h> #include <algorithm> using namespace std;
int main() { int n,m,a,b,c; cin>>n>>m; a=n/m; c=a*m; b=n-c; cout<<b<<" "<<a; }
- 1
信息
- ID
- 811
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 5
- 标签
- 递交数
- 1414
- 已通过
- 514
- 上传者