hi to all..

i would like to ask if this algorithm is accepted or is it a cheat? thanks

here's my code


import java.util.*;
public class loop1
{