Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
A few suggestions: 1. use ascii-codes, not chars (d=94). 2. Initialise i when you declare it. 3. Use i++<m instead of separate increment (need to modify the contents of the loop in one place, but this adds no cost). 4. Can you get away with (i&1<<j++)>0? 5. I don't think you need the {} for the inner for loop. 6. You can replace a[k]==d||a[k]==u with a[k]>45, I think. 7. Go with j=k=0. All that should remove 19bytes.
You can shave 26bytes off this by doing a few simple things, like declaring i with v, consulting an ASCII table so you can use small numbers, rearranging the ifs, and then using a ternary: class Z{static void Main(string[]a){int v=0,i;foreach(var s in a){i=s[0]%'d';if(i==1)break;if(i>9)System.Console.Write(v);else v=i<1?v-1:i<5?v/2:i<6?v+1:v*2;}}} (P.S. an explanation of how it works and how to use it (e.g. expects command line args) is always appreciated!)
Note that this actually calls the static String.Concat(object) with the argument, rather than the virtual calling object.ToString(). Concat explicitly converts null to the empty string (see the reference source). There is no 'native casting' going on, you can convert anything like this, it's just that the result might not be very useful in some cases! (but the null behaviour may well be).
Golfing Java and C# (my department) is great fun! Keep at it! Not tested, but I think you can save a few bytes by rejigging the for loops: you can pre-assign i=0, or better, i=l, and count down for(;i-->0;h=d>h?d:h) (and stuff the h= bit in there). The same back-counting will work for the inner loop also. The inner if also has no need for the braces {}. And always be weary of <= or >=, you can turn the ternary around with > and save a byte.
Input and output look fine to me! I'm dreadful at JS, but do you need d? Would (p-v)**2 not work? Unless another surprise answer pops out of the ether, I'll accept this in a couple of days.
This is a bit dodgy... because the lambda stuff is absolutely essential (i.e. you can't just pass in the variable, you have to pass something that the compile will recognise should become an Expression). You should also be counting using System.Linq.Expressions;.
Not checked these properly, but: you never use i in isolation, just initialise i=m and compare i<b+m; or... just use i, init i=0 but loop on i<a, then add r[i]=new string('#',a), next to j=0, and add a condition to check i is within bounds for j's loop (this ought to pay off, because you lose all the Linq).
Can save quite a bit by using the return value from Thread.Join(int), (rid of c, lose braces, etc. etc.): var t=new System.Threading.Thread(()=>System.Console.ReadKey());t.Start();return(t.Join(10000)?"":"no ")+"input recieved"; (VB.NET already seems to do this)