Category: UVa
Dont forget to use format specifier for unsigned int %u #include<iostream> #include<cstdio> int main() { unsigned int a,b,output;…
By thinking 24 hr++ I have solved this problem.I got guidance from my friend M.H Riyad also..He…
Solution actually simple…You have to think simple here is the cartesian co ordinate link check here then…
#include<stdio.h> int main() { int i,t,a,b; scanf(“%d”,&t); for(i=0;i<t;i++){ scanf(“%d %d”,&a,&b); if(a<b) printf(“<\n”); else if(a>b) printf(“>\n”); else printf(“=\n”);…
#include<cstdio> #include<algorithm> using namespace std; int num[100], n; int gcd(int a, int b) { return b ?…
#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);…
Recent Comments