Jump to content
Hertz

[Programare]Java 1

Recommended Posts

Posted

Up.java

Rulati acest fisier,iar parola este raspunsul lui.


public class UpCount {
private long calc(int depth) {
if (depth == 0) return 1;
long cc = calc(depth - 1);
return cc + (depth % 7) + ((((cc ^ depth) % 4) == 0) ? 1 : 0);
}
public static void main(String[] args) {
UpCount uc = new UpCount();
System.out.println(uc.calc(11589));
}
}

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...