#include<iostream>
using namespace std;
int main()
{
int sa,sb,da,db;
cin>>sa>>sb;
da=sa/sb;
db=sa-sb*da;
cout<<da<<" "<<db;
return 0;
}
| Problem 1009 >> 1009 |
|
15825596000 @ 2020-02-01 14:00:56
#include<iostream>
using namespace std; int main() { int sa,sb,da,db; cin>>sa>>sb; da=sa/sb; db=sa-sb*da; cout<<da<<" "<<db; return 0; } |
|
tangruide @ 2020-02-14 20:05:40
求余的话,可以用%这个符号。
举个例子10%3=1 |
|
slslslsslslsl @ 2023-05-30 18:45:50
#include <stdio.h>
int main(){ int a,b; scanf("%d %d",&a,&b); printf("%d %d",a/b,a%b); return 0; }//C语言(你提交成C++也可以) |
|
secessionist @ 2023-11-05 18:43:57
史上最长a+b!!!1000字!!!
#include<iostream> #define so_croting 1 #define so_croming -1 #define so_crowing 0 #define ant_if if #define ant_else else # define _GLIBCXX_VISIBILITY(V) _GLIBCXX_PSEUDO_VISIBILITY(V) namespace std _GLIBCXX_VISIBILITY(default) {} using namespace std; typedef int node; node a,b; void outstring(string n) { cout << n << endl; } void output(node n) { cout << n << endl; } void sitting() { outstring("请您稍等谢谢!"); } void sleep() { for (int j = 0; j < 100; j++); sitting(); } void made(); void make(); void input(node s) { ant_if(s == 1) { cin >> a >> b; } ant_else{output(a + b);} } void made_so_make() { made(); make(); } void made() { input(so_croting); for (int i = 0; i < 100; i++) { outstring("LOGIN"); sleep(); system("cls"); } for (int i = 0; i < 100; i++) { outstring("COMPUTEING"); sleep(); system("cls"); } } void make() { input(so_croming); } int main() { made_so_make(); return so_crowing; } |