Posted By

cmm7825 on 05/20/10


Tagged


Versions (?)

Problem 13


 / Published in: Perl
 

  1. #!/usr/bin/perl
  2. use strict;
  3. use warnings;
  4. use bignum;
  5.  
  6. my $sum = 0;
  7. open INFILE, "<13.in";
  8.  
  9. while(my $line = <INFILE>){
  10. $sum += int($line);
  11. }
  12.  
  13. $sum =~ m/(^\d{10})/;
  14. print $1;

Report this snippet  

You need to login to post a comment.