Search found 10 matches

by Tanzim-Saqib
Thu Oct 30, 2003 6:28 pm
Forum: Volume 6 (600-699)
Topic: 694 - The Collatz Sequence
Replies: 46
Views: 15746

You know what... Practice makes a man perfect! :D
by Tanzim-Saqib
Mon Oct 27, 2003 9:11 pm
Forum: Volume 6 (600-699)
Topic: 694 - The Collatz Sequence
Replies: 46
Views: 15746

This one is very simple and pretty straight forward 3n+1 problem. Now try these... Input: 1 1 2147483647 1 1 2147483647 2 2147483647 2147483647 2 2147483647 214748364 214748364 2147483647 1 0 -3 -2 Output: Case 1: A = 1, limit = 1, number of terms = 1 Case 2: A = 2147483647, limit = 1, number of ter...
by Tanzim-Saqib
Mon Oct 27, 2003 9:01 pm
Forum: Off topic (General chit-chat)
Topic: Should cutted source code
Replies: 13
Views: 4265

Studying many source codes I learnt a lot of things which I did not find in the book. When I was a novice ACM solver I even did't know how to take inputs until End Of File. Source code postings of few guys I did understand. There are a number of people don't know that they should not use clrscr(), g...
by Tanzim-Saqib
Sun Oct 26, 2003 10:48 pm
Forum: Volume 101 (10100-10199)
Topic: 10170 - The Hotel with Infinite Rooms
Replies: 20
Views: 9696

I am a very weak analytical thinker, so that I have used neither binary search nor derived any formula. I have just used a staright forward method.. (complete brute force).

Code: Select all

i=s+1, total=s

begin_of_the_loop
	if not (total<d) break
	total = total + i;
	i = i + 1
end_of_loop
print(i-1)
Hope it helps!
by Tanzim-Saqib
Sun Oct 26, 2003 10:32 pm
Forum: Volume 5 (500-599)
Topic: 543 - Goldbach's Conjecture
Replies: 109
Views: 23620

Have you ever heard of Erasthostenes Sieve (how the hell do you write it??) What a way of talking!!!! [c]int isPrime(unsigned long long p) { unsigned long long i; for(i=2;i<=sqrt(p);i++) if(!(p%i)) return 0; return 1; }[/c] Trust me, this function is enough for this problem, whenever you need to ch...
by Tanzim-Saqib
Sun Oct 26, 2003 10:25 pm
Forum: Volume 5 (500-599)
Topic: 579 - Clock Hands
Replies: 44
Views: 13842

I don't understand why these while loops (except for taking inputs) are necessary. Morning, just derive an equation where there will only be minutes and hour and nothing else, no more loops. Hope it helps.
by Tanzim-Saqib
Sun Oct 26, 2003 9:40 pm
Forum: Off topic (General chit-chat)
Topic: How old are you? Statistics.
Replies: 121
Views: 175002

Hi I am Tanzim Saqib from Bangladesh, will be 19 soon . Basically I have been trying to be a software developer and do work with VB, Java, C/C++, Scripting languages, ASP, Win32 API etc. I am a member since December 2003, but haven't worked hard on ACM. Yet, I have set a problem - 10490 Mr. Azad and...
by Tanzim-Saqib
Sun Oct 26, 2003 9:23 pm
Forum: Off topic (General chit-chat)
Topic: A programmer and his wife !
Replies: 0
Views: 1531

A programmer and his wife !

One of my old friends forwarded me this story couple of days ago... hope you'll enjoy! SCENE: A wife is waiting for her husband who is a programmer. After some time, the husband arrives. HUSBAND: (Opening the door and entering in) Hi dear! I am LOGGED IN. WIFE: Thanks God that you have arrived. Have...
by Tanzim-Saqib
Fri Jun 06, 2003 6:14 pm
Forum: Volume 4 (400-499)
Topic: 488 - Triangle Wave
Replies: 270
Views: 29848

I think you have not got the answer yet. So I am trying to help you.
NOTE: There is a blank line after each separate waveform, excluding the last one.
Read the problem statement carefully, and I hope you can solve this very easy problem.
by Tanzim-Saqib
Fri Jun 06, 2003 6:01 pm
Forum: Volume 1 (100-199)
Topic: 113 - Power of Cryptography
Replies: 162
Views: 15539

It's a very simple problem. In C at most 'long double' you may use for this problem, check for equivalent data type in Pascal.

Go to advanced search