If I'm not mistaken, there are at least to possible answers for N=13, which are 1 and 7.
I think the wording should say something like "If there's more than one solution, print the lowest possible m."
Search found 8 matches
- Sat Feb 28, 2004 3:05 am
- Forum: Volume 1 (100-199)
- Topic: 151 - Power Crisis
- Replies: 56
- Views: 11678
- Thu Nov 14, 2002 8:39 pm
- Forum: Volume 5 (500-599)
- Topic: 594 - One Little, Two Little, Three Little Endians
- Replies: 46
- Views: 23261
help
read the thread "Giving up on gcj"...
- Thu Nov 14, 2002 8:37 pm
- Forum: Java
- Topic: Compile Error
- Replies: 1
- Views: 2620
help
First, I think your mailer is breaking the lines where it shouldn't.
You are using the ReadLn() function and there's a comment on it that extends through two lines. Something like //utility function to read from stdin.
The compiler thinks that "stdin" is a normal statement that should be compiled ...
You are using the ReadLn() function and there's a comment on it that extends through two lines. Something like //utility function to read from stdin.
The compiler thinks that "stdin" is a normal statement that should be compiled ...
- Thu Nov 14, 2002 8:34 pm
- Forum: Java
- Topic: Java code with new classes always generate compile errors.
- Replies: 1
- Views: 2626
help
I don't think that creating your own classes has anything to do with the problem. I've got programs Accepted with classes of my own.
try doing this on main:
public static void main(Strign args[])
{
Main m = new Main();
m.start();
}
private void start()
{
//all functionality here
}
try doing this on main:
public static void main(Strign args[])
{
Main m = new Main();
m.start();
}
private void start()
{
//all functionality here
}
- Thu Nov 14, 2002 8:30 pm
- Forum: Java
- Topic: Compiler error!
- Replies: 3
- Views: 3014
some help
Read the thread "Giving up on gcj" for some help. Basically, you should try creating an instance of your Main class and call methods on it:
...
public static void main(String args[])
{
Main m = new Main();
m.start();
}
private void start()
{
//implement all functionality here
}
...
This ...
...
public static void main(String args[])
{
Main m = new Main();
m.start();
}
private void start()
{
//implement all functionality here
}
...
This ...
- Thu Nov 14, 2002 8:26 pm
- Forum: Volume 1 (100-199)
- Topic: 197 - Cube
- Replies: 20
- Views: 4481
Some help
I also spent a few desperate days with that same problem. What I did, and haven't got an "Internal Compiler Error" since, was something like this:
import ....
class Main
{
static String ReadLn()
{
...
}
public static void main(String args[])
{
Main m = new Main();
m.start();
}
private void ...
import ....
class Main
{
static String ReadLn()
{
...
}
public static void main(String args[])
{
Main m = new Main();
m.start();
}
private void ...
- Sun Oct 27, 2002 9:51 pm
- Forum: C
- Topic: Unbelievable
- Replies: 1
- Views: 2493
Unbelievable
I have two almost perfectly equivalent (on my mind they're equivalent) programs. One in Java, the other one in C. One gets Accepted by the judge, the other doesn't. Obviously, it's the Java one that doesn't work :)
Originally, I was using different ways to solve the problem. For example, I was using ...
Originally, I was using different ways to solve the problem. For example, I was using ...
- Sun Oct 27, 2002 9:48 pm
- Forum: Java
- Topic: Unbelievable
- Replies: 1
- Views: 2385
Unbelievable
I have two almost perfectly equivalent (on my mind they're equivalent) programs. One in Java, the other one in C. One gets Accepted by the judge, the other doesn't. Obviously, it's the Java one that doesn't work :)
Originally, I was using different ways to solve the problem. For example, I was using ...
Originally, I was using different ways to solve the problem. For example, I was using ...