Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
NWD
#include <iostream> using namespace std; int nwd(int a,int b) { int c; while(b != 0) { c = a % b; a = b; b = c; } return a; } int main() { int x=0; scanf("%d",&x); for (int i=0; i<x; i++) { int a,b; scanf("%d %d", &a, &b); int y=nwd(a,b); scanf("%d %d", &a, &b); int g=nwd(a,b); int f=nwd(y,g); printf("%d\n",f); } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
MCM
The Menu
Exempel 4
ignat2
Op&&^Overload
20201123
shell sort
obracanie tablicy
simple use of templete
133
Please log in to post a comment.