Skip to content

Instantly share code, notes, and snippets.

@Zelakolase
Created September 9, 2020 03:08
Show Gist options
  • Save Zelakolase/4b8e7604dd2361ef5318501e72cdbcad to your computer and use it in GitHub Desktop.
Save Zelakolase/4b8e7604dd2361ef5318501e72cdbcad to your computer and use it in GitHub Desktop.
How to غش Legally in the Math Class
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
public class FOR_MR_AMR {
public static void main(String[] args) {
// X x Y = ?
int[] X = {1,2,3};
int[] Y = {4};
Map<Integer,Integer> RES = new HashMap<Integer,Integer>();
for(int i = 0;i<X.length;i++) {
for (int ii = 0;ii<Y.length;ii++) {
RES.put(X[i],Y[ii]);
}
}
System.out.print("{");
for (Entry<Integer, Integer> set : RES.entrySet()) {
System.out.print("("+set.getKey()+","+set.getValue()+")");
}
System.out.print("}");
}
}
@Zelakolase
Copy link
Author

OUTPUT : { (1,4) (2,4) (3,4) }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment