fork download
  1. program excursion2;
  2. var
  3. A, F, M, S, W : LongInt;
  4.  
  5. begin
  6. { assign(input, 'input.txt'); reset(input);
  7.   assign(output, 'output.txt'); rewrite(output);}
  8.  
  9. ReadLn(A);
  10.  
  11. ReadLn(F);
  12.  
  13. ReadLn(M);
  14.  
  15. S := 2*M+3*F+A;
  16. W := M+F+a;
  17. WriteLn(S);
  18. WriteLn(W);
  19.  
  20. end.
  21.  
Success #stdin #stdout 0s 5272KB
stdin
50
50
50
stdout
300
150