Search found 7 matches

by kenny1har
Mon Sep 08, 2003 10:30 am
Forum: Volume 3 (300-399)
Topic: 369 - Combinations
Replies: 101
Views: 17307

Thanks for your help :D

thanks, I have got 'Accepted'.
It's only the output that was wrong. :D
by kenny1har
Mon Sep 08, 2003 10:23 am
Forum: Volume 2 (200-299)
Topic: 294 - Divisors
Replies: 91
Views: 23655

294 - Divisors

[pascal] program p294; var i,j,n,x,y,xtemp,ytemp,max,now,num:longint; divisor:array[1..100000] of byte; function scan(x:longint):longint; var i,sum,limit:longint; begin i:=2; limit:=trunc(sqrt(x))+1; while x>1 do begin while frac(x/i)<0.00000001 do begin x:=x div i; inc(divisor ); end; inc(i); if i>...
by kenny1har
Sun Sep 07, 2003 12:52 pm
Forum: Volume 3 (300-399)
Topic: 369 - Combinations
Replies: 101
Views: 17307

369 please help me

[pascal] program p369; var m,n,i:longint; r:real; begin while not eof(input) do begin readln(m,n); if (m=0) and (n=0) then exit; r:=1; if n>m-n then n:=m-n; for i:=2 to n do r:=r/i; for i:=m downto m-n+1 do r:=r*i; writeln(m,' things taken ',n:0,' at a time is ',round(r):0,' exactly.'); end; end. [/...
by kenny1har
Fri May 23, 2003 1:59 pm
Forum: Volume 2 (200-299)
Topic: 299 - Train Swapping
Replies: 81
Views: 11238

thanks cytse, it works !!!!

thanks for your comments.
by kenny1har
Fri May 23, 2003 1:54 pm
Forum: Volume 4 (400-499)
Topic: 495 - Fibonacci Freeze
Replies: 222
Views: 30689

495 - can anybody help me ?

i don't understand why my program is wrong please give any comments .... how about the output format for a very big number (with exponential ?) [pascal] program p495 (input, output); var n,j :integer; x,y,z,temp:extended; begin while not eof(input) do begin readln(n); x:=1; y:=1; if n=0 then z:=0 el...
by kenny1har
Thu May 22, 2003 3:55 pm
Forum: Volume 6 (600-699)
Topic: 612 - DNA Sorting
Replies: 122
Views: 16193

612 - can anyone help me

i don't understand why my program is wrong please give any comments .... [pascal] program p612 (input,output); type dnaset=array[1..50] of string; dnacountset=array[1..50] of integer; var m,n,j,k:integer; ch:string; dnacount:dnacountset; dna:dnaset; procedure ssort(z:integer;dna:dnaset); var n,j,k :...
by kenny1har
Thu May 22, 2003 3:53 pm
Forum: Volume 2 (200-299)
Topic: 299 - Train Swapping
Replies: 81
Views: 11238

299 - can anyone help me

I don't understand why my program is wrong please give any comments.... [pascal] program p229 (input,output); type aset=array[1..50] of integer; var a:aset; n,nn,train,j,k:integer; function bsort(var a:aset) :integer; var j,k,temp,n:integer; begin n:=0; for j:=nn downto 2 do for k:=1 to nn-1 do if a...

Go to advanced search