| |
| |
| |
|
Page: 1 2 3 4 5
Comments:
<0> ah ye <0> i bet that patented <1> Gotisch <1> want a challenge? <0> sure <1> ok <1> http://www.olympiad.org.uk/papers/2005/samples/samples.html <0> ? <0> whats that <1> the british informatics olympiad sample questions <0> i though more in a line of a tcl script to do :] <1> i'm doing the 2006 one this week <0> oh <1> yeah try one of those 3 sample questions <0> in tcl? <1> i'm either gonna do it in tcl or in pascal
<1> depends on the question i get <1> i just tried that mayan one... and its pretty ****in hard <0> hey thats nice <0> gonna try mayan one <0> doesnt seem that hard <1> hehe <1> thats what i thought <0> brb <1> make sure you read it all <1> i didnt read it all and when i found out it wanted me to convert from mayan to our dates it was too late <1> i mean from our dates to mayan <1> i got it to convert from mayan to ours, but cant be bothered to do it the other way around <0> ha <0> shouldn't be that hard really <0> was 2000 a leap year? <0> pretty simple even <0> lets start writing <2> 2000 wasnt leap year <1> hummm <2> oh it was <1> lol <2> they got some weird rules <2> dividable with 100 isnt leap year <1> look @ the connect 4 one <2> but dividable with 400 is <1> yeah <2> u wont hit any of them probs ;) <1> for the purpose of this... just divisable by 4 = leap year <2> i doubt u or any of ur script will be here 2100 ;) <1> lol <0> ye thats the problem <1> its really simple how to do it <0> ; expr 2002 % 4 <3> Gotisch: #3830 (212 clicks) Tcl: 2 <0> ; expr 2004 % 4 <3> Gotisch: #3831 (239 clicks) Tcl: 0 <1> i just figured it out <0> was 2004 a leap year too? <1> 13 20 7 16 3 <-- let that equal 0 <2> yes Gotisch <4> lindex "{a b c}" 0 <3> brigante: #3836 (125 clicks) Tcl: a b c <4> lindex {a b c} 0 <3> brigante: #3837 (150 clicks) Tcl: a <4> lindex a b c 0 <4> lindex {{a b c}} 0 <3> brigante: #3839 (142 clicks) Tcl: a b c <0> one day 24 hours? <2> u living under a rock Gotisch ? :) <1> hours doesnt matter? <0> i mean for the converter <0> maybe the mayans had 20 hours day <1> lol <1> yeah they did <1> its all about days <1> its really simple though <1> ;regexp {\d+\.0} 3.2 <1> ;regexp {\d+\.0} 3.0 <3> [GRiMMY]: #3849 (664 clicks) Tcl: 0 <1> ;regexp {\d+\.0} 3.6 <3> [GRiMMY]: #3850 (209 clicks) Tcl: 1
<3> [GRiMMY]: #3851 (203 clicks) Tcl: 0 <0> damn <0> ! <0> doesnt work <1> lol <1> mine nearly does <0> i dont get why mine not <0> oh <0> i get it <0> mh <0> how much days is a katun? <0> 20*18*20 <0> isnt it? <0> ; expr 20*18*20 <3> Gotisch: #3864 (188 clicks) Tcl: 7200 <0> oh <0> damn <1> hehe <0> ; clock seconds <3> Gotisch: #3868 (136 clicks) Tcl: 1141599256 <0> ; set a [clock seconds] <3> Gotisch: #3869 (32329 clicks) Tcl error: can't set "a": variable is array <0> ; set abc [clock seconds] <3> Gotisch: #3870 (203 clicks) Tcl: 1141599273 <0> damn <0> im so stupid <0> ; incr abc [expr 18*20*20*24*60*60] <3> Gotisch: #3873 (261 clicks) Tcl: 1763679273 <0> why does this give me a negative number in my shell? <0> Adding 20*7200*24*60*60 = -443301888 <0> because its small int <0> ! <0> how do i convert to big int again? <1> ok testing time <2> dont use int :) <1> wooot <1> % tomayan 1 1 2000 <1> Our Date: 1 0 2000 <1> Mayan Date: 13 20 7 16 3 <1> oops lol <0> BL4DE how do i change it again <1> % tomayan 1 1 2000 <1> Our Date: 1 1 2000 <1> Mayan Date: 13 20 7 16 3 <1> your doing something wrong Gotisch <1> theres no need for a number that big <0> puts "Adding $what*$con*24*60*60 = [expr {$what*$con*24*60*60}]" <0> Adding 20*7200*24*60*60 = -443301888 <1> ;expr 7 % 7 <3> [GRiMMY]: #3894 (249 clicks) Tcl: 0 <0> oh <0> 7200 <0> but thats ok too <0> it still does it <0> ; expr 20*7200*24*60*60 <3> Gotisch: #3899 (251 clicks) Tcl: -443301888 <0> see <0> ; expr wide(20*7200*24*60*60) <3> Gotisch: #3901 (235 clicks) Tcl: -443301888 <1> ummm <1> no <0> i need big int <1> no you dont <1> array set mayan { <1> kin <1> uinal <1> tun <1> katun0 <1> baktun000 <1> } <0> ye <1> thats the number of days in each mayan thing <0> i have that already <0> my only problem is that i convert it to seconds
Return to
#tcl or Go to some related
logs:
#c #delphi #linux-noob #nhl #winxp #politics inno DeleteFile clod gamedev #red #microsoft
|
|