C#
Re: C#
Ok, C#, good idea, I like this language too, no many as Python and Ruby, but I like it. I can say this is the language in where I am better. If you know something about C, C++ or Java, C# will be very easy for you. C# is upswing of the languages before mentioned. If you want I teach you C#, I’ll do this. But… I recommend Python and Ruby
.
This is an integer in C#:
int pepe = 50; //(like C, C++ and Java…)
An “int” have 32 bits, a “long” have 64, a “short” have 16, and a “bit”… (obvious)
Now is 2:00 am… another day I’ll follow. Good Nigth.
(The forum clock is bad)

This is an integer in C#:
int pepe = 50; //(like C, C++ and Java…)
An “int” have 32 bits, a “long” have 64, a “short” have 16, and a “bit”… (obvious)
Now is 2:00 am… another day I’ll follow. Good Nigth.
(The forum clock is bad)
Re: C#
Hi phantom, i need your help, in the problem "1382 - Sum of Cubes" and in others too, the result most given in mod 1000007, i dont understand what that means and how to do it in c#, i have the algorithm for the problem but i dont know how to do de mod 1000007 thing, can you help me please?
Re: C#
Thanks bro, i do what you tell me but for the last case steel give me a wrong answer, the problem is "1382 - Sum of Cubes", for the two first cases give the right answer but in the last case, give me a negative value when the right is 441. please help me with that.
Ejemplo de entrada
3
1 10
27 27
1 1000000000000000000
Ejemplo de salida
9
27
441
Ejemplo de entrada
3
1 10
27 27
1 1000000000000000000
Ejemplo de salida
9
27
441
Re: C#
Your problem is not in C#. Your Problem is in your implementation. When you are adding in an integer, and in a certain moment the value of your integer is negative, is because this integer is out of range. When an integer, double, long, etc… exceed its maximum value, it take its minimum value, like a loop. In your implementation, you are not using very well the modulus operator (%) or you are not putting it in the places it must be.
Re: C#
You have reason, my problem is not in c sharp, but i wrote in the problem set my questions and nobody answer me, and i take the chance that you help me with c sharp for make you this question.
Well, can any boy explain me what for 1 1000000000000000000 the result is 441??
Well, can any boy explain me what for 1 1000000000000000000 the result is 441??
Re: C#
you are right lets talk about c-sharp so, in this code:
Why reverse==lista, what i want is have the sort list in ascending order in "lista" and in descending order in "l_reverse", but the C# when i do " l_reverse.Reverse()" make to lista equal to l_reverse. Can someone help me?
Code: Select all
string[] info = Console.ReadLine().Split();
List<int> lista = new List<int>();
foreach (string x in info)
{
lista.Add(int.Parse(x));
}
lista.Sort();
List<int> l_reverse = lista;
l_reverse.Reverse();