1 solutions
-
0
C++ :
#include<iostream> #include<cstdlib> using namespace std; int main() { int a,b,c; cin>>a>>b; c=a/b; cout<<c<<" "<<a-(b*c); return 0; }Pascal :
var a,b,x,y:longint; begin readln(x,y); if x>y then begin a:=x div y; b:=x mod y; writeln(a,' ',b); exit; end; if x<y then begin a:=y div x; b:=y mod x; writeln(a,' ',b); exit; end; end.
- 1
Information
- ID
- 17121
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- (None)
- Tags
- # Submissions
- 0
- Accepted
- 0
- Uploaded By