fork download
  1. using System.Console;
  2. public class Test
  3. {
  4. public static Main() : void
  5. {
  6. mutable f = ReadLine();
  7. mutable x = 0;
  8. mutable y = 1;
  9. for(mutable i = 99; i >= 0; i--){
  10. if(f[i] == '1'){
  11. x = x+y;
  12. }
  13. else{
  14. x = x;
  15. }
  16. y *= 2;
  17. }
  18. WriteLine(x);
  19. }
  20. }
Runtime error #stdin #stdout #stderr 0.02s 16168KB
stdin
1011101110000101000110100111100001111010111110000001110000011001111011111111110000010000111111100010
stdout
Standard output is empty
stderr
Unhandled Exception: System.OverflowException: Number overflow.
  at Test.Main () [0x00000]