Search found 2 matches

by torifat
Sun Dec 02, 2007 9:31 pm
Forum: Volume 4 (400-499)
Topic: 412 - Pi
Replies: 104
Views: 30323

Got AC :P
by torifat
Sun Dec 02, 2007 12:52 am
Forum: Volume 4 (400-499)
Topic: 412 - Pi
Replies: 104
Views: 30323

WA

Why WA?? :(

#include <stdio.h>
#include <math.h>
#include <algorithm>

using namespace std;

int gcd(int a, int b) {
if(b==0) return a;
return gcd(b,a%b);
}

int list[55];

int main() {

int n,i,j;

while(scanf("%d",&n)==1) {
if(n==0) break;

for(i=0; i<n; ++i)
scanf("%d",&list[i]);

int ...

Go to advanced search