fork download
  1. using System;
  2. public class Test
  3. {
  4. public static Main() : void
  5. {
  6. def s = System.Console.ReadLine();
  7. def arr : array[int] = array(150);
  8. for(mutable i = 55; i>=0;i--) {
  9. arr[i] = 0;
  10. }
  11. for(mutable n = 0; n < 100; ++n) {
  12. for(mutable i = 50; i>=0;i--) {
  13. arr[i] *= 2;
  14. arr[i+1] += arr[i] / 10;
  15. arr[i] %= 10;
  16. }
  17. if(s[n]=='1'){
  18. arr[0] += 1;
  19. } else {
  20. }
  21. }
  22. for(mutable i = 50; i>=0;i--) {
  23. System.Console.Write("{0}",arr[i]);
  24. }
  25. }
  26. }
Success #stdin #stdout 0.03s 19600KB
stdin
0011100111011100110111000001100010000011010011111010110001011010001101011001111011000100001001011101
stdout
000000000000000000000286522377807071156356791419485