Guest User

Untitled

a guest
Apr 4th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.80 KB | None | 0 0
  1. import java.io.*;
  2. import java.util.*;
  3. import java.lang.*;
  4. import java.awt.*;
  5. import java.awt.geom.*;
  6. import java.math.*;
  7. import java.text.*;
  8. import java.math.BigInteger.*;
  9. import java.util.Arrays;
  10.  
  11. public class adsfadsfqeq
  12. {
  13. BufferedReader in;
  14. StringTokenizer as;
  15. boolean nums[],nums2[];
  16. int[] nums1[];
  17. ArrayList < Integer > [] ar;
  18. Map<Integer,Integer > map = new HashMap<Integer, Integer>();
  19. public static void main (String[] args)
  20. {
  21. new adsfadsfqeq ();
  22. }
  23.  
  24. public int GCD(int a, int b) {
  25. if (b==0) return a;
  26. return GCD(b,a%b);
  27. }
  28.  
  29. public adsfadsfqeq ()
  30. {
  31.  
  32. try
  33. {
  34. in = new BufferedReader (new InputStreamReader (System.in));
  35. FileWriter out = null;
  36. out = new FileWriter ("data" + ".txt");
  37. BufferedWriter bw = null;
  38. bw = new BufferedWriter(out);
  39. String a = "";
  40. for(int x = 0;x<50000;x++)
  41. {
  42. if(Math.random() < 0.60)
  43. a += 'a';
  44. else if(Math.random() < 0.5)
  45. a += 'x';
  46. else
  47. a += 'y';
  48. }
  49. bw.write(a +"\n");
  50. bw.close();
  51. out.close();
  52. }
  53. catch(Exception e)
  54. {
  55. }
  56.  
  57. }
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65. String next () throws IOException
  66. {
  67. while (as == null || !as.hasMoreTokens ())
  68. {
  69. as = new StringTokenizer (in.readLine ().trim ());
  70. }
  71.  
  72.  
  73. return as.nextToken ();
  74. }
  75.  
  76.  
  77.  
  78. long nextLong () throws IOException
  79. {
  80. return Long.parseLong (next ());
  81. }
  82.  
  83.  
  84. int nextInt () throws IOException
  85. {
  86. return Integer.parseInt (next ());
  87. }
  88.  
  89.  
  90. double nextDouble () throws IOException
  91. {
  92. return Double.parseDouble (next ());
  93. }
  94.  
  95.  
  96. String nextLine () throws IOException
  97. {
  98. return in.readLine ().trim ();
  99. }
  100. }
Add Comment
Please, Sign In to add comment