Math Is Fun Forum
  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

Login

Username

Password

Not registered yet?

#26 2012-02-13 04:18:45

anonimnystefy
Real Member

Online

Re: @MIF , Activity:Drawing squares

(m-m+1)???


The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
 

#27 2012-02-13 06:09:54

bobbym
Administrator

Offline

Re: @MIF , Activity:Drawing squares

Looks like a typo,

Since m>=n it probably should read (m-n+1).


In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.
 

#28 2012-02-18 00:58:06

anonimnystefy
Real Member

Online

Re: @MIF , Activity:Drawing squares

Task :: Kvadratici
In planar rectangular integer grid dimension n x m (are nm squares). How many different squares are in this grid which have corners on integer coordinate (sides of this squares doesn't have to be parallel with sides of grid) ?


INPUT:
In first and only row of standard input are two numbers n and m - dimension of rectangular grid (1 <= n, m <= 10^9).


OUTPUT:
Let K be needed number of squares. On standard input write modulo with division K with 10^9 + 7.



Notes:
In 40% tests 1 <= n, m <= 100
In 60% tests 1 <= n, m <= 1.000
In 80% tests 1 <= n, m <= 1.000.000



Input:
2 3

Output:
10




Input:
500 501

Output:
271062715


The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
 

#29 2012-02-18 01:06:45

bobbym
Administrator

Offline

Re: @MIF , Activity:Drawing squares

I am not following you what are you looking for that was not already given?


In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.
 

#30 2012-02-18 01:14:38

anonimnystefy
Real Member

Online

Re: @MIF , Activity:Drawing squares

well the complexity of the algorithm that solves this problem should be O(1) as i was told.


The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
 

#31 2012-02-18 01:25:35

bobbym
Administrator

Offline

Re: @MIF , Activity:Drawing squares

You mean a linear function?


In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.
 

#32 2012-02-18 01:31:50

anonimnystefy
Real Member

Online

Re: @MIF , Activity:Drawing squares

yes.


The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
 

#33 2012-02-18 01:36:42

bobbym
Administrator

Offline

Re: @MIF , Activity:Drawing squares

Just fit a straight line between the two points you know and interpolate between them.


In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.
 

#34 2012-02-18 02:10:11

anonimnystefy
Real Member

Online

Re: @MIF , Activity:Drawing squares

what do you mean?


The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
 

#35 2012-02-18 07:19:44

bobbym
Administrator

Offline

Re: @MIF , Activity:Drawing squares

You have:

(23,10) and (500501,271062715)


In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.
 

#36 2012-02-18 08:10:12

anonimnystefy
Real Member

Online

Re: @MIF , Activity:Drawing squares

hi bobbym

the should algorithm should always have the same execution time.


The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
 

#37 2012-02-18 08:12:30

bobbym
Administrator

Offline

Re: @MIF , Activity:Drawing squares

That is where I am getting confused, an algorithm could be a process, like a computer program.


In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.
 

#38 2012-02-18 08:19:40

anonimnystefy
Real Member

Online

Re: @MIF , Activity:Drawing squares

yes,and that is what i need. big_smile


The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
 

#39 2012-02-18 10:14:15

bobbym
Administrator

Offline

Re: @MIF , Activity:Drawing squares

Hi anonimnystefy;

In order for a an algorithm to have about the same execution time it would have to be a formula.


In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.
 

#40 2012-02-18 10:42:50

anonimnystefy
Real Member

Online

Re: @MIF , Activity:Drawing squares

that's what i'm looking for big_smile


The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
 

#41 2012-02-18 12:04:33

bobbym
Administrator

Offline

Re: @MIF , Activity:Drawing squares

Hi;

How many do you count for this?


Uploaded Images
View Image: score.png      


In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.
 

#42 2012-02-19 01:16:51

anonimnystefy
Real Member

Online

Re: @MIF , Activity:Drawing squares

hi bobbym

24. that's including the tilted squares,because that problem says to include those.


The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
 

#43 2012-02-19 06:03:26

bobbym
Administrator

Offline

Re: @MIF , Activity:Drawing squares

I can do better than that, I see 26 but the formula I have sees 30...


In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.
 

#44 2012-02-19 06:29:05

anonimnystefy
Real Member

Online

Re: @MIF , Activity:Drawing squares

oh,i forgot some sqrt(2)*sqrt(2) squares.sorry.

so what would the formula be?


The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
 

#45 2012-02-19 06:53:01

bobbym
Administrator

Offline

Re: @MIF , Activity:Drawing squares

Your new total then is 26?


In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.
 

#46 2012-02-19 07:01:47

anonimnystefy
Real Member

Online

Re: @MIF , Activity:Drawing squares

no,it's 30.


The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
 

#47 2012-02-19 07:03:43

bobbym
Administrator

Offline

Re: @MIF , Activity:Drawing squares

Very good! The old have very sharp eyes indeed.


In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.
 

#48 2012-02-19 07:06:23

anonimnystefy
Real Member

Online

Re: @MIF , Activity:Drawing squares

there are the ones with sides of sqrt(3),sqrt(2) and 1.

the old have sharp eyes?you're confusing me now.you told me you were 8 or 9 years old.


The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
 

#49 2012-02-19 07:07:40

bobbym
Administrator

Offline

Re: @MIF , Activity:Drawing squares

Yes, and to me you are an old timer. Ready for retirement. But with sharp eyes.


In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.
 

#50 2012-02-19 07:18:26

anonimnystefy
Real Member

Online

Re: @MIF , Activity:Drawing squares

ok.so what's the conclusion on this? what's the formula?


The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
 

Board footer

Powered by FluxBB