Programming › Re: Simple Factorial Challenge by Slyr0x(op): 11:51am On May 23, 2016 |
Great job Jacob05. Your solution is more efficient. Solution below as solved by someone on my team bcscale(25); $itotal = "0"; $xt = "0.7893";$ii = 1; $yyy = "1";while ($ii <= 5000) { $y2 = intval(gmp_add($yyy,"1" ); $y3 = strval($y2); $factit = gmp_fact($y2); $at = bcdiv(gmp_mul("2", gmp_sub($factit,"1" ), $factit); $xtpow = bcpow($xt,$y2); $anst = bcmul($at,$xtpow); $itotal = bcadd($itotal,$anst); $yyy = gmp_add($yyy,"1" ; $ii++; }
echo "Solution: " .$itotal."<br />"; |
Programming › Re: Simple Factorial Challenge by Slyr0x(op): 3:43pm On May 20, 2016 |
Lyphiard: Please do not answer this problem. The OP has taken this question from a competition and is attempting to cheat. Calm your tits. I solved the challenges before posting here, and the answer for this is 5.08xxxxxxxxxxxxxxxxxx. I will release the write up later  . Cheers Kiddo, R. |
Programming › Re: Simple Factorial Challenge by Slyr0x(op): 3:34pm On May 18, 2016 |
larisoft: @OP... your questions are real brain heaters. I love them! But would you please provide the solutions after each of them has been unsolved for hours?. Many of us attempt them for hours and it will be nice to finally know the solution after trying so hard! I sure will. Thanks |
Programming › Re: Simple Factorial Challenge by Slyr0x(op): 3:30pm On May 17, 2016 |
bump |
Programming › Simple Factorial Challenge by Slyr0x(op): 10:26pm On May 15, 2016 |
Bola discovered a mysterious piece of paper, containing a mysterious formula:
x^2 + (5/3)x^3 + (23/12)x^4 + (119/60)x^5 ... + (2*[5000!-1]/[5000!])x^5000
Bola was curious, and so decided to evaluate the expression for x=0.7893
What number was returned, to the nearest 20 decimal places? |
Programming › Re: Simple Java Challenge by Slyr0x(op): 9:37pm On May 15, 2016*. Modified: 9:54pm On May 15, 2016 |
^^
The answer is a number that starts with 132.................
Use the hashcode() :-) |
Programming › Simple Algorithm Challenge by Slyr0x(op): 9:07pm On May 15, 2016 |
Taye and Kenny were in class. They both tried to describe a man that was once sick. Taye said "The man had a cold." Kenny said "The man had had a cold." According to English grammar, Kenny was correct.
Now imagine their two teachers, Seun and Tony: Tony was a little off, and said that "Taye, while Kenny had had 'had had', had had 'had'; 'had' had had the better grammar." Seun corrected him, saying "Kenny, while Taye had had 'had', had had 'had had'; 'had had' had had the better grammar."
Continuing this pattern, the knowledgeable supervisor would note that "Seun, while Tony had had 'had had had had had had had had had had', had had 'had had had had had had had had had had had'; 'had had had had had had had had had had had' had had the better grammar."
Continuing this, how many 'had's would be in the incorrect 100th iteration? |
Programming › Re: Simple Python Challenge by Slyr0x(op): 8:45pm On May 15, 2016 |
proxy20: I don't know python I don't think anyone will be interested in this Greek mathematics and the program is poorly written . I tried to run the Greek program since I can't do shit . 
my guess ans is 0.25 Wrong. |
Programming › Re: Simple Java Challenge by Slyr0x(op): 8:40pm On May 15, 2016 |
crotonite: HOPE I AM RIGHT
**Modified** i think i found a bug.. i used args[3] instead of args[2]. i can't rectify it now Wrong |
Programming › Simple Python Challenge by Slyr0x(op): 3:57pm On May 15, 2016 |
Hey guys, Another challenge. Question : Tope wrote a computer program. He isn't a very good programmer, so his program takes too long. Can you figure out the output? import struct import ctypes import cmath
offset = struct.calcsize('PP') def set(x, i): ctypes.c_ssize_t.from_address(id(x) + offset).value = i
def get(x): return x ^ 0
set(1, 23) set(2, (lambda x:x + 1)(1)) set(3, 59) set(4, 134) v = hash(open(__file__).read()[-587:]) + 93607936174329872951 set(5, -287) j = 12219 n = 12 dsdaasdkjdsf = (v*v*v*v*v )**0.5 while n < dsdaasdkjdsf + 10: set(1, get(3) - get(4) + get(5) + get(5) + get(5) + get(5) + get(5) + get(2)) set(2, -get(3)-get(3) + get(4) + get(4) + get(4) - get(5) - get(5) - get(5) - get(5) - get(5) - get(5) - get(2) - get(2) - get(2) - get(2) - get(2) - get(2) - get(2)) set(3, get(1) + get(1) + get(3)) set(4, get(1) + get(2) + get(3) + get(5)) set(5, -get(4) -get(4) -get(4)+ get(1) + get(1) + get(1) + get(1) + get(1)) n -= int((2.7182818 ** (3.14159265j)).real - 0.2) print get(5) % 10**100 |
Programming › Simple Java Challenge by Slyr0x(op): 11:27am On May 15, 2016 |
Hey guys, I came across this challenge and thought to share. Challenge question : What is the frame? import java.util.Random; import java.util.Scanner;
public class PlsHalp { public static void main(String[] args) { Scanner s = new Scanner(System.in); int i = s.nextInt(); args = new String[i]; for(int x = i-1; x >= 0; x--) args[x] = s.nextLine(); String tot = ""; for(String str: args) tot += str; if(tot.equals("my feet smell and nose runs" ) System.out.println("Use knee on frame: " + (args[0] + args[2] + args[4] + args[6]).replace(" ", "" .hashCode()); } } |
Celebrities › Re: Toke Makinwa And Her Cornrows Step Out In Style (photos) by Slyr0x: 7:40pm On Apr 16, 2016 |
|
Programming › Re: Number Generator Challenge : Can You Solve This? by Slyr0x(op): 8:35am On Mar 27, 2016 |
|
Programming › Re: Can You Solve This? by Slyr0x(op): 7:26am On Mar 25, 2016 |
proxy20: password Enter the key o d0248b4e 47996655 83f05689 lc154b6ea If it doesn't work put it in a online MD6 hash generator to generate a password . Reverse d0248b4e4799665583f05689lc154b6ea, and you have your answer i.e. ae6b4....... |
Programming › Re: Can You Solve This? by Slyr0x(op): 7:58pm On Mar 24, 2016 |
proxy20: msgbox ('coding in jetbrain'); You didnt get it. |
Programming › Re: Can You Solve This? by Slyr0x(op): 5:01pm On Mar 24, 2016*. Modified: 7:58pm On Mar 24, 2016 |
You missed this.reverse  |
Programming › Re: Can You Solve This? by Slyr0x(op): 5:01pm On Mar 24, 2016 |
proxy20: password
Enter the key o d0248b4e 47996655 83f05689 lc154b6ea
If it doesn't work put it in a online MD6 hash generator to generate a password . this.reverse  |
Programming › Re: Number Generator Challenge : Can You Solve This? by Slyr0x(op): 5:13pm On Mar 23, 2016 |
proxy20: in java gui
JTextField.Text=random.Next(1,16)
Random generator = new Random();
JOptionPane.showMessageDialog( generate); it Is just for me to place the button and textfield in jframe . The objective of this exercise is not to create a random generator. If putting in a 16 character string "1234567890123456", generates a serial number "1650614882-1650614882-1650614882-1650614882", what 16 character string do I have top put in, to generate "851122601-565353145-976764089-3706359006"?? Look at the other sequences to perfect your algorithm |
Programming › Re: Number Generator Challenge : Can You Solve This? by Slyr0x(op): 5:08pm On Mar 23, 2016 |
SleepingDemon
This is the question "Given the following sequences, what will be my 16 character string to generate the serial number "851122601-565353145-976764089-3706359006" ?" |
Programming › Re: Can You Solve This? by Slyr0x(op): 5:06pm On Mar 23, 2016 |
proxy20: There is no query to in the main c.s . I run the code in windows form in c# . The errors was much . You don't need to run it. Look at the code, and interpret it. This is an .exe file. When you run it, it asks for a password. We need to get that pass. The pass has been defined "txtPass". Cheers |
Programming › Number Generator Challenge : Can You Solve This? by Slyr0x(op): 1:27pm On Mar 23, 2016 |
I have a number generator, that takes in 16 characters, and then generates a serial number.
The following are the sequences generated by this number generator:
Please enter a 16 character string to generate: 1234567890123456 Your Serial key is: 1751540834-1886284906-1684168818-1818912870
Please enter a 16 character string to generate 1111111111111111 Your Serial key is: 1650614882-1650614882-1650614882-1650614882
Please enter a 16 character string to generate 2222222222222222 Your Serial key is: 421075225-421075225-421075225-421075225
Please enter a 16 character string to generate 0987654321234567 Your Serial key is: 463215768-429529755-429463705-463149722
Please enter a 16 character string to generate qwertyuiopasdfgh Your Serial key is: 3838504674-884653242-3871531230-875803442
Please enter a 16 character string to generate mnbvcxzasdfghjkl Your Serial key is: 3972324570-3270832326-3469527270-909489460
Given the following sequences, what will be my 16 character string to generate the serial number "851122601-565353145-976764089-3706359006" ? |
Programming › Can You Solve This? by Slyr0x(op): 10:01am On Mar 23, 2016*. Modified: 11:05am On Mar 23, 2016 |
Guys, I came across this, and thought to share. Basically, there is a .exe file, which when you run, requests for a password. The objective of this- is to get the password. Let's see who can solve this - please document your thoughts process too. Cheers
using System; using System.ComponentModel; using System.Drawing; using System.Windows.Forms;
namespace rot { public class Form1 : Form { private IContainer components; private Label label1; private TextBox txtPass; private Button btnCheck; private Label label2; private Label label3; private Label label4; private Label label5;
public Form1() { this.InitializeComponent(); }
private string reverse(string original) { char[] chArray = original.ToCharArray(); Array.Reverse((Array) chArray); return new string(chArray); }
private bool ShallHePass() { return this.txtPass.Text == this.reverse(this.label2.Text + this.label3.Text + this.label4.Text + this.label5.Text); }
private void btnCheck_Click(object sender, EventArgs e) { this.label3.Text = "47996655"; int num = (int) MessageBox.Show(this.ShallHePass() ? "you shall pass" : "you shall not pass" ; }
private void Form1_Load(object sender, EventArgs e) { this.label4.Text = "83f05689"; }
protected override void Dispose(bool disposing) { if (disposing && this.components != null) this.components.Dispose(); base.Dispose(disposing); }
private void InitializeComponent() { this.label1 = new Label(); this.txtPass = new TextBox(); this.btnCheck = new Button(); this.label2 = new Label(); this.label3 = new Label(); this.label4 = new Label(); this.label5 = new Label(); this.SuspendLayout(); this.label1.AutoSize = true; this.label1.Location = new Point(12, 80); this.label1.Name = "label1"; this.label1.Size = new Size(131, 13); this.label1.TabIndex = 0; this.label1.Text = "Enter the key on the ring:"; this.txtPass.Location = new Point(143, 77); this.txtPass.Name = "txtPass"; this.txtPass.Size = new Size(129, 20); this.txtPass.TabIndex = 1; this.btnCheck.Location = new Point(105, 125); this.btnCheck.Name = "btnCheck"; this.btnCheck.Size = new Size(75, 23); this.btnCheck.TabIndex = 2; this.btnCheck.Text = "I shall Pass!"; this.btnCheck.UseVisualStyleBackColor = true; this.btnCheck.Click += new EventHandler(this.btnCheck_Click); this.label2.AutoSize = true; this.label2.ForeColor = SystemColors.Control; this.label2.Location = new Point(12, 165); this.label2.Name = "label2"; this.label2.Size = new Size(55, 13); this.label2.TabIndex = 3; this.label2.Text = "d0248b4e"; this.label3.AutoSize = true; this.label3.ForeColor = SystemColors.Control; this.label3.Location = new Point(12, 178); this.label3.Name = "label3"; this.label3.Size = new Size(55, 13); this.label3.TabIndex = 4; this.label3.Text = "47886655"; this.label4.AutoSize = true; this.label4.ForeColor = SystemColors.Control; this.label4.Location = new Point(12, 191); this.label4.Name = "label4"; this.label4.Size = new Size(53, 13); this.label4.TabIndex = 5; this.label4.Text = "83f05688"; this.label5.AutoSize = true; this.label5.ForeColor = SystemColors.Control; this.label5.Location = new Point(12, 204); this.label5.Name = "label5"; this.label5.Size = new Size(54, 13); this.label5.TabIndex = 6; this.label5.Text = "c154b6ea"; this.AutoScaleDimensions = new SizeF(6f, 13f); this.AutoScaleMode = AutoScaleMode.Font; this.ClientSize = new Size(284, 262); this.Controls.Add((Control) this.label5); this.Controls.Add((Control) this.label4); this.Controls.Add((Control) this.label3); this.Controls.Add((Control) this.label2); this.Controls.Add((Control) this.btnCheck); this.Controls.Add((Control) this.txtPass); this.Controls.Add((Control) this.label1); this.FormBorderStyle = FormBorderStyle.FixedSingle; this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "Form1"; this.Text = "Enter"; this.Load += new EventHandler(this.Form1_Load); this.ResumeLayout(false); this.PerformLayout(); } } }
|
Education › Re: FUTO Students Represent Nigeria In Dubai Hultprize 2016 (photos) by Slyr0x: 4:08pm On Mar 13, 2016 |
|
Career › Re: Should I Sell My Virginity To Retain My Job? by Slyr0x: 10:16pm On Feb 24, 2016 |
Story sounds like something that was made up.
I assume an audit firm would have a formal termination procedure. Your direct boss has no business directly sacking you, as that is the HR Partner/Manager's responsibility.
In addition, as part of this "formal termination procedure", an audit firm would atleast have "Warning", "Suspension", and then dismissal.
Anyways, what do I know? |
Career › Re: How Are You Coping With ACCA Exam Fees Payment? by Slyr0x: 8:51am On Feb 22, 2016 |
Glory be to the Lord Almighty for this great feat and achievement! While my mates are being commended for scientific discoveries; here I am, wallowing in the First-To-Comment Odoriferous phantasmagoria. Presticimo, I also seize this great opportunity to thank my family, my friends, my parents, my uncle, my aunt, my grandmother, my grandfather, and my Internet provider for giving me the privilege to comment first on this page. I am Happy, I am H'excited, I never Hexperrerit  |
Christianity Etc › Re: How Pastors Deceive Their Congregation #photo. by Slyr0x: 10:34am On Feb 21, 2016 |
|
Business › Re: Lady Wore Bum-Short To Ecobank In Abeokuta (Photos) by Slyr0x: 1:23pm On Feb 18, 2016 |
|
Celebrities › Re: Funmi Iyanda Throws Shade At DonJazzy ? (see Tweet) by Slyr0x: 12:34pm On Jan 27, 2016 |
|
Crime › Re: Man Gives Stolen SUV To Pastor For Prayers For Barren Wife To Conceive (pic) by Slyr0x: 12:24pm On Jan 25, 2016 |
|
Music/Radio › Re: What Are Those Cool Songs You Listen To At Night After A Hectic Day? by Slyr0x: 6:57am On Jan 24, 2016 |
|
Properties › Re: I Just Realised I Bought A Goverment Land, What Should I Do? by Slyr0x: 9:18am On Jan 21, 2016 |
|
Education › Re: 18 Things People who attended UNILAG can completely relate To by Slyr0x: 9:08am On Jan 21, 2016 |
|