Example #1
0
 public void TestAdd( string a, string b, string expected )
 {
     BigInt bi = new BigInt( a );
      bi.Add( b );
      Assert.AreEqual( expected, bi.ToString() );
 }
Example #2
0
 public long Solve()
 {
     try
      {
     BigInt sum = new BigInt();
     foreach ( string number in _numbers )
     {
        sum.Add(number);
     }
     string value = sum.ToString();
     value = value.Substring( 0, 10 );
     return long.Parse( value );
      }
      catch ( Exception e )
      {
     Console.WriteLine( e );
      }
      return 0;
 }