Search:

Type: Posts; User: Mathsniper

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. What's problem of adding two binary number?

    The problem appears in [url]http://acm.hnu.cn:8080/online/?action=problem&type=show&id=10475[\url]
    Just very simple method, first I reverse the binary number. Then I fill the zero in the remaining...
  2. But I cannot call extending library. Because the...

    But I cannot call extending library. Because the online judge doesn't accept that. And my friend told me that I had solved this problem using the method I have mentioned above by pascal language. And...
  3. Replies
    3
    Views
    1,659

    sorry for my lazy habit and the wrong link. The...

    sorry for my lazy habit and the wrong link. The problem is calcuating how often does the letter appear from A to Z. I don't know why I get the wrong answer. For example, I input the following data
    ...
  4. Replies
    3
    Views
    1,659

    May anyone find some bugs from this code?

    I have spent lots of time to debug but no result get. Problem from http://acm.hnu.cn:8080/online/?action=problem&type=show&id=10190
    My idea:
    1) Calcuating the letter how often they appear.
    2) Find...
  5. problem about handle "double" variable type? or?

    I am doing a problem about calcuating first digit of a^p form(a and p are non-negative integer. The total length of a^p never exceed 200). a and p may be a very large number. So I wanna make variable...
  6. Replies
    18
    Views
    3,013

    oh!!!!!!!!!!!! you're right! I complie the code...

    oh!!!!!!!!!!!! you're right! I complie the code based on Linux gcc implementation. I think the online judge is based on Microsoft system. The code is pass. Thank everyone to help me.
  7. Replies
    18
    Views
    3,013

    ? what do you mean? vart?

    ? what do you mean? vart?
  8. Replies
    18
    Views
    3,013

    No, the data maynot be saved as buffer and print...

    No, the data maynot be saved as buffer and print it at time.
    I wrote it by pascal. It can pass. But C doesn't.


    var t:int64;
    n,j:longint;
    begin
    readln(n);
    for j:=1 to n do
    begin
  9. Replies
    18
    Views
    3,013

    I'm sorry I don't reply the post for a long time....

    I'm sorry I don't reply the post for a long time. After I edit the code, it cannot be passed.


    #include <stdio.h>
    #include <math.h>

    int main()
    {
    int i, n;
    long x, k;
  10. Replies
    18
    Views
    3,013

    who can know that what's the problem here?

    who can know that what's the problem here?
  11. Replies
    7
    Views
    1,448

    thanks ssharish2005, I haven't throught that it...

    thanks ssharish2005, I haven't throught that it will be crashed with C++ variaible name of operator.
  12. Replies
    4
    Views
    2,294

    char *p; while (*p != '\n') p++; *p = '\0';

    char *p;
    while (*p != '\n') p++;
    *p = '\0';
  13. Replies
    18
    Views
    3,013

    Assume a[k] stands for "1" index. "1" will appear...

    Assume a[k] stands for "1" index. "1" will appear in 1,2, 4, 7, 11, 16, 22, 29,....
    Which means a[k]=a[k-1]+k-1, so we can find that a[n]=(n-1)n/2 + 1. If we assume a[n] = k. Then we obtian...
  14. Replies
    18
    Views
    3,013

    What's the problem about this program?

    I am doing a problem about http://acm.hnu.cn:8080/online/?action=problem&type=show&id=10238
    I have uploaded it for many time but get WRONG ANSWER. So I hope someone can help me. This is my solution...
  15. How to confirm the number is square number?

    is there any efficent method to do it? for example,


    5
    false
    7
    false
    9
    true
    49
  16. Replies
    7
    Views
    1,448

    thank Salem. I have other problem about passing...

    thank Salem. I have other problem about passing by value of variable "operator" at function "void operation(char operator)". The output is very strange. It cannot display "+", "-" or "*" properly....
  17. Replies
    7
    Views
    1,448

    can I use strtok to read it easily? or other...

    can I use strtok to read it easily? or other method?
  18. Replies
    7
    Views
    1,448

    problem of reading Postfix Evaluation

    For example, 1 2 3 * + 4 -. A space between two data(operand or operator).
    How to read it step by step and save as a proper parameter? for example, I declare two variable `int operand; char...
  19. Replies
    5
    Views
    1,794

    I have fixed it. A few bugs here. But now it is...

    I have fixed it. A few bugs here. But now it is correct.


    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #define MAX(a,b) ((a)>(b)?(a):(b))
    #define MIN(a,b) ((a)<(b)?(a):(b))...
  20. How to set a delimiter for each line's string?

    for example,


    ; : <------- Including space!
    This is;av23afgg k;fg: k.!

    output data


    This
  21. Replies
    5
    Views
    1,794

    unpredictable answer output of factorial

    I use precision multiplication method to implement it. But when I input > 11, the answer is strange! I don't know where is the bugs... hope anyone can find it. Thanks.


    #include <stdio.h>...
  22. yes, dwks. I wanna change the order of arguments.

    yes, dwks. I wanna change the order of arguments.
  23. I have a problem about precision multiplication....

    I have a problem about precision multiplication. The code I wrote below.


    int charToInt(char x)
    { return (int)(x-'0'); }

    char intToChar(int x)
    { return (char)(x+'0'); }

    void reverse(char...
  24. thank Salem!!! :)

    thank Salem!!! :)
  25. How to change a number to char*? Like 50 --> "50"

    How to do it in the simplest method?
Results 1 to 25 of 77
Page 1 of 4 1 2 3 4