Login:
Pass:
Forgotten Pass?
Forums
Forum Home
Search
Today's Posts
Members List
Calendar




Search
Google
Search TBCS
Search the Web


Follow Us On




Go Back   TBCS Community Forums > Community Center > TBCS Challenges


Welcome to the TBCS Community Forums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.
Reply
 
Thread Tools
  #1  
Old 04-04-2008, 04:11 PM
XcOM's Avatar
XcOM XcOM is offline
Posts: 2,931
Ceann na Drochaide Bige!
 
XcOM Modder SupremeXcOM Modder SupremeXcOM Modder SupremeXcOM Modder SupremeXcOM Modder SupremeXcOM Modder SupremeXcOM Modder SupremeXcOM Modder SupremeXcOM Modder SupremeXcOM Modder SupremeXcOM Modder Supreme
My System
Default Counting


Welcome, this is a challange for the coders here, The idea is to write a program that will count to the number in the section you are entering in.

The rules are as follows:
* No one is to share there code
* No one is to copy anyone else's program
* You are to write your program yourself but you may get help from friends.

The sections are:
* Visual Basic
- 1 Million
- 2 Million
- 5 Million
- 10 Million
- 100 Million

* C & C++
- 1 Million
- 2 Million
- 5 Million
- 10 Million
- 100 Million

* Other languages
- 1 Million
- 2 Million
- 5 Million
- 10 Million
- 100 Million

*your program must make a record of the numbers it counts, wether it displays this or saves a document it is upto you.

To enter make your program and e-mail myself at tbcscomp@gmail.com with your program compiled into an EXE and the source code so i can verify your entry.

I will compile a results table for each section after the compition has ended (19th,Apr,2008 ) and a winner announced.

All programs will be run on my test system to get an accurate result after the comp has ended, a winner will be announced within one week of ending.
And the most important part, Have fun.
__________________


Mary had a little lamb. It bumped into a pylon. Ten thousand volts went up its arse and turned its wool to nylon!

Last edited by XcOM : 04-07-2008 at 03:43 PM.
Reply With Quote
  #2  
Old 04-04-2008, 05:09 PM
halcyonforever's Avatar
halcyonforever halcyonforever is offline
Posts: 257
Carpe Apenodytes
 
halcyonforever is popular and handy to have around.halcyonforever is popular and handy to have around.
Default Re: Counting

Questions for this competition:
  • Purpose: Is the goal to write the most elegant code, the spiffiest program, or the fastest running.
  • Hardware: are we limited in our usage of equiptment. (ie: one computer only or can we botnet a whole company in a distributed computing super-cluster)
Reply With Quote
  #3  
Old 04-04-2008, 05:25 PM
XcOM's Avatar
XcOM XcOM is offline
Posts: 2,931
Ceann na Drochaide Bige!
 
XcOM Modder SupremeXcOM Modder SupremeXcOM Modder SupremeXcOM Modder SupremeXcOM Modder SupremeXcOM Modder SupremeXcOM Modder SupremeXcOM Modder SupremeXcOM Modder SupremeXcOM Modder SupremeXcOM Modder Supreme
My System
Default Re: Counting

the purpose is to count to the target as fast as possable, and as for hardware the tables i produce will be for desktops/laptops and one for special pc's IE Clusters

My records sofar are:
1million: 8 seconds
2million: 12 seconds
5million: 26 seconds
10million: 56 seconds
and 1 billion is still running after 1 hour, and is currently writting a file sitting at 8.2GB sofar, but i don't know what number it is upto as i have my program set to ignore everything but counting.

Also mine is coded in VB6, i got to find a way to use dual cores.
__________________


Mary had a little lamb. It bumped into a pylon. Ten thousand volts went up its arse and turned its wool to nylon!
Reply With Quote
  #4  
Old 04-04-2008, 06:22 PM
Trace's Avatar
Trace Trace is offline
Posts: 2,059
Overclocking Guru
 
Trace knows almost everything about modding.Trace knows almost everything about modding.Trace knows almost everything about modding.Trace knows almost everything about modding.Trace knows almost everything about modding.Trace knows almost everything about modding.Trace knows almost everything about modding.Trace knows almost everything about modding.Trace knows almost everything about modding.Trace knows almost everything about modding.Trace knows almost everything about modding.
My System
Default Re: Counting

XcOM, did you get this Idea from me? Haha, I will start work immediately.
__________________
Quote:
Originally Posted by Lothair View Post
I guess it's just widely used and has had some of the best people in the world work on it, costing a ridiculous amount of money, for no actual reason. :/
Have you checked out the front page lately?
Projects:
Moe's Tavern | Sponsored by: Mimo Monitors, Crucial, Thermaltake
Book Of Knowledge
Reply With Quote
  #5  
Old 04-04-2008, 06:42 PM
crenn's Avatar
crenn crenn is offline
Posts: 4,043
Fox Furry
 
crenn Modder Supremecrenn Modder Supremecrenn Modder Supremecrenn Modder Supremecrenn Modder Supremecrenn Modder Supremecrenn Modder Supremecrenn Modder Supremecrenn Modder Supremecrenn Modder Supremecrenn Modder Supreme
My System
Default Re: Counting

Why do I have a feeling I'm going to have to learn multithreading now.....

Should I take a link down to my C code which counts (doesn't store to a file though)?

EDIT: Also does the version of C/C++ use matter?
__________________
<IMAGED REMOVED: OMEGA MADE FOXY DISAPPEAR>
JDBNSN MADE FOXY CRY
Antec Sonata II |
Pioneer DVR-212
Good news! You can follow my website or follow me on twitter!
Reply With Quote
  #6  
Old 04-04-2008, 07:18 PM
Trace's Avatar
Trace Trace is offline
Posts: 2,059
Overclocking Guru
 
Trace knows almost everything about modding.Trace knows almost everything about modding.Trace knows almost everything about modding.Trace knows almost everything about modding.Trace knows almost everything about modding.Trace knows almost everything about modding.Trace knows almost everything about modding.Trace knows almost everything about modding.Trace knows almost everything about modding.Trace knows almost everything about modding.Trace knows almost everything about modding.
My System
Default Re: Counting

Well, My program just told me it took 3.625 Seconds to count to 1 million
Programmed in VB6

This is WITHOUT multi threading

From the values below, you can see it is almost linear relationship between which number you count to and how long it takes. In fact, you will notice that if you multiply the 100 Million time by 5 it is actually longer then what 500 Million took.

System specs: 2.3 GHz Athlon 64 X2

My Records
1 Million: 3.406 Seconds
2 Million: 7.047 Seconds
5 Million: 17.906 Seconds
10 Million: 34.562 Seconds
100 Million: 394.563 Seconds
500 Million: 1887.578 Seconds
1 Billion: 3732.39 Seconds = 62.2 Minutes 12GB file
__________________
Quote:
Originally Posted by Lothair View Post
I guess it's just widely used and has had some of the best people in the world work on it, costing a ridiculous amount of money, for no actual reason. :/
Have you checked out the front page lately?
Projects:
Moe's Tavern | Sponsored by: Mimo Monitors, Crucial, Thermaltake
Book Of Knowledge

Last edited by Trace : 04-04-2008 at 08:39 PM. Reason: Added an analysis
Reply With Quote
  #7  
Old 04-05-2008, 01:35 AM
weazel6265's Avatar
weazel6265 weazel6265 is offline
Posts: 57
Anodized
 
weazel6265 is friendly and helpful.weazel6265 is friendly and helpful.
Default Re: Counting

Who wants a headache?

This is a slight violation of the rules, but I don't think too many people are going to benefit from it.
My program counts from 0 to 1,000,000 in roughly .5 seconds, while storing these values into a .txt file

my code, for anyone who dares:
Code:
import java.util.*;
import java.io.*;
import java.lang.management.*;
class ${int _;char O=(char)0X0A;boolean $=!(1!=0%1);String __$=""+'$';
char O(int x){return(char)(x*83+32);}char O1(int x){return(char)((x<<1)+99);}
char l0(int x){return(char)(x+100);}int l01(int y){return(y==1?10:10*l01(--y));}
public static void main(String args[])throws Exception{new $();}$()throws Exception{
long $_=$_();toilet=$$();_%=1;for(;!$;)_();

toilet.flush(); //always a must

_$_(($_()-$_)*.01/(15^5)/(117&(55<<1))/(64|36)/(11^111)
+""+O(0)+O(1)+O1(1)+O1(0)+l0(11)+l0(10)+l0(0)+O(1)+O);}
void _()throws Exception{toilet.write(_+""+O);++_;$=(_>l01(6));}
long $_(){return t.getCurrentThreadCpuTime();}
void _$_(Object x){__().print(x);}
PrintStream __(){return System.out;}
BufferedWriter $$()throws Exception{return new BufferedWriter(new FileWriter(__$));}
ThreadMXBean t=ManagementFactory.getThreadMXBean();
BufferedWriter toilet;}
And yes, it is syntactically correct, compiles, and does what it is described as doing.

To run it, just copy the code into a file called $.java, then compile it, and run it. This will output the time taken, and the numbers will be in a new file which it creates.

Have fun
__________________
I'm not creative enough to think of a funny sig. Just quietly laugh to yourself and I'll be happy.
Reply With Quote
  #8  
Old 04-05-2008, 02:29 AM
Trace's Avatar
Trace Trace is offline
Posts: 2,059
Overclocking Guru
 
Trace knows almost everything about modding.Trace knows almost everything about modding.Trace knows almost everything about modding.Trace knows almost everything about modding.Trace knows almost everything about modding.Trace knows almost everything about modding.Trace knows almost everything about modding.Trace knows almost everything about modding.Trace knows almost everything about modding.Trace knows almost everything about modding.Trace knows almost everything about modding.
My System
Default Re: Counting

Well, I'm not going to even touch that.
I would really like to learn Java though. I'm currently working on that actually.
__________________
Quote:
Originally Posted by Lothair View Post
I guess it's just widely used and has had some of the best people in the world work on it, costing a ridiculous amount of money, for no actual reason. :/
Have you checked out the front page lately?
Projects:
Moe's Tavern | Sponsored by: Mimo Monitors, Crucial, Thermaltake
Book Of Knowledge
Reply With Quote
  #9  
Old 04-05-2008, 07:44 AM
crenn's Avatar
crenn crenn is offline
Posts: 4,043
Fox Furry
 
crenn Modder Supremecrenn Modder Supremecrenn Modder Supremecrenn Modder Supremecrenn Modder Supremecrenn Modder Supremecrenn Modder Supremecrenn Modder Supremecrenn Modder Supremecrenn Modder Supremecrenn Modder Supreme
My System
Default Re: Counting

Java gives me a headache... most likely because I don't know how to program it.

Currently I'm holding off this comp because of the fact I need to complete my C assignment. If you want the source code of the program(for my assignment) I'm working on, I'll be happy to share it after Friday 5PM (last day it's due). Just PM me asking for it.
__________________
<IMAGED REMOVED: OMEGA MADE FOXY DISAPPEAR>
JDBNSN MADE FOXY CRY
Antec Sonata II |
Pioneer DVR-212
Good news! You can follow my website or follow me on twitter!
Reply With Quote
  #10  
Old 04-05-2008, 12:01 PM
IndyRacer27's Avatar
IndyRacer27 IndyRacer27 is offline
Posts: 247
Linux dabbler
 
IndyRacer27 is a helpful and decent person.IndyRacer27 is a helpful and decent person.IndyRacer27 is a helpful and decent person.
Default Re: Counting

weazel6265, yes definitely gave me headache. Have you ever heard of the International Obfuscated C Code Contest and here? Your program reminded me of it. The fact that you came up with that is pretty impressive. I'm guessing you're not just a hobby programmer.
__________________
My goal in life is to earn enough money to enjoy the lifestyle that my wife and kids do.
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is On
Forum Jump

Translate This Page

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
thebestcasescenario.com