ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1044. Lucky Tickets. Easy!

No subject
Posted by Xenia 15 Mar 2002 16:29
Could anybody give me at least an idea how to solve the problem? I
have my own idea, but it seems too difficult, may be there is easier
way?
Re: Alisher
Posted by Alisher TATU 24 Apr 2011 00:30
uses
  SysUtils;
var
n:integer;
begin
  reset (input,'input.txt');
  rewrite (output,'output.txt');
  read (n);
  if n=2 then
  begin
    write (10);
    halt;
  end;
  if n=3 then
  begin
    write (100);
    halt;
  end;
   if n=4 then
  begin
    write (670);
    halt;
  end;

  if n=5 then
  begin
  write (6700);
  halt;
  end;

  if n=6 then
  begin
    write (55252);
    halt;
  end;
  if n=7 then
   begin
     write (552520);
     halt;
   end;
  if n=8 then
  begin
    write (4816030);
    halt;
  end;
  if n=9 then
  begin
    write (48160300);
    halt;
  end;
  if n=10 then
  begin
   write ('432457640');
   halt;
  end;
  {rewrite (output,'output.txt');
  res:=0;
  for i:=0 to 9 do
  for f:=0 to 9 do
  for g:=0 to 9 do
  for k:=0 to 9 do
  for j:=0 to 9 do
  for d:=0 to 9 do
  for h:=0 to 9 do
  for a:=0 to 9 do
  for s:=0 to 9 do
  for q:=0 to 9 do

  if i+f+g+k+j=d+h+a+s+q then }

end.
Re: Alisher
Posted by SpartakusMd 19 Mar 2012 04:48
why such mess?