Tag: 11417

05
Apr
2014

UVa Solution – 11417 – GCD

#include<stdio.h> int main() { int N; while(scanf(“%d”,&N)==1) { if(N==0) break; int G=0,i,j; for(i=1;i<N;i++) { for(j=i+1;j<=N;j++) { G+=GCD(i,j);…