herrDeng網內搜尋
自訂搜尋
Ads
訂閱:
張貼留言 (Atom)
熱門文章
-
教育部為提昇全民資安素養與電腦防護能力,本部於101年9月5日至11月5日舉辦「全民資安素養自我評量」活動,請在活動期間內踴躍上網檢測資訊安全素養認知程度,並有機會參與抽獎,詳情請參閱活動網站(網址: https://isafe.moe.edu.tw/event
-
先說明一下這是後知後覺的解答,所謂後知就是股票價格已知存在陣列(清單),當然就要用迴圈練習,雙迴圈暴力解需時O(n**2),當然不用,採python單一迴圈解答「最佳股票的買賣時機#LeetCode 121 Best Time to Buy and Sell Stock」,解...
-
url="https://www.twse.com.tw/exchangeReport/STOCK_DAY?response=json&date=20220330&stockNo=2330"
-
你會用C的算子sizeof?
-
Python C++使用字串find迴圈速解Leetcode 2490 Circular Sentence C++ & Python都有字串的find,用法都類似 split=s.find(' ', split+1)能找到s從index=split+1開...
-
Python CPP heap priority queue速解L eetcode 2530. Maximal Score After Applying K Operations heap/priority queue是重要的資料結構,無論是C++的std::priority_q...
53 則留言:
import java.util.Arrays;
public class t0528 {
public static void randomInt50(int[] a){
int i;
for(i=0;i<a.length;i++){
a[i]=(int)Math.round(Math.random()*100);
System.out.print(i+"->"+a[i]+" ");
}
}
public static void main(String[] args) {
int[] a=new int[50];
randomInt50(a);
System.out.println("");
for (int j=0;j<14;j++)
System.out.print("---------我是分隔線---------");
System.out.println("");
Arrays.sort(a);
for(int i=0;i<a.length;i++)
System.out.print(i+"->"+a[i]+" ");
}
}
import java.io.*;
import java.util.*;
public class aa
{
public static void main(String[] args)
{
int[] a = new int[50];
for (int i=0; i < a.length ;i++)
{
a[i] = (int)(Math.random()*1000+1);
}
Arrays.sort(a);
for (int i=0;i<a.length;i++)
{
System.out.print("\r");
System.out.print(a[i]+"\t");
}
System.out.println();
}
}
import java.io.*;
import java.util.*;
public class jerry
{
public static void main(String[] args)
{
int[] a = new int[50];
for (int i=0; i < a.length ;i++)
{
a[i] = (int)(Math.random()*1000+1);
}
Arrays.sort(a);
for (int i=0;i<a.length;i++)
{
System.out.print("\r");
System.out.print(a[i]+"\t");
}
System.out.println();
}
}
import java.io.*;
import java.util.*;
public class aa
{
public static void main(String[] args)
{
int[] a = new int[50];
for (int i=0; i < a.length ;i++)
{
a[i] = (int)(Math.random()*1000+1);
}
Arrays.sort(a);
for (int i=0;i<a.length;i++)
{
if (i%10==0)
System.out.print("\r");
System.out.print(a[i]+"\t");
}
System.out.println();
}
}
import java.io.*;
import java.util.*;
public class aa
{
public static void main(String[] args)
{
int[] a = new int[50];
for (int i=0; i < a.length ;i++)
{
a[i] = (int)(Math.random()*1000+1);
}
Arrays.sort(a);
for (int i=0;i<a.length;i++)
{
if (i%10==0)
System.out.print("\r");
System.out.print(a[i]+"\t");
}
System.out.println();
}
}
import java.io.*;
import java.util.*;
public class abc
{
public static void main(String[] args)
{
int[] a = new int[50];
for (int i=0; i < a.length ;i++)
{
a[i] = (int)(Math.random()*1000+1);
}
Arrays.sort(a);
for (int i=0;i<a.length;i++)
{
if (i%10==0)
System.out.print("\r");
System.out.print(a[i]+"\t");
}
System.out.println();
}
}
import java.io.*;
import java.util.*;
public class aa
{
⋯⋯ public static void main(String[] args)
{
int[] a = new int[50];
for (int i=0; i < a.length ;i++)
{
a[i] = (int)(Math.random()*1000+1);
}
Arrays.sort(a);
for (int i=0;i<a.length;i++)
{
if (i%10==0)
System.out.print("\r");
System.out.print(a[i]+"\t");
}
System.out.println();
}
}
import java.util.*;
public class MtcTW
{
public static void randomInt900(int []a)
{
for(int i=0; i<a.length; i++)
{
a[i]=(int)Math.round(Math.random()*100);
System.out.println(i+"->"+a[i]);
{
if(i%10==9)
System.out.println();
}
}
}
public static void main(String[] args)
{
int [] a=new int[50];
randomInt900(a);
System.out.println("--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------");
Arrays.sort(a);
for(int i=0; i<a.length; i++)
{
System.out.println(i+"->"+a[i]);
{
if(i%10==9)
System.out.println();
}
}
}
}
import java.util.*;
public class apple
{
public static void randomInt900(int []a)
{
for(int i=0; i<a.length; i++)
{
a[i]=(int)Math.round(Math.random()*100);
System.out.println(i+"->"+a[i]);
{
if(i%10==9)
System.out.println();
}
}
}
public static void main(String[] args)
{
int [] a=new int[50];
randomInt900(a);
System.out.println("------------------------------");
Arrays.sort(a);
for(int i=0; i<a.length; i++)
{
System.out.println(i+"->"+a[i]);
{
if(i%10==9)
System.out.println();
}
}
}
}
import java.util.*;
public class Sam
{
public static void randomInt900(int []a)
{
for(int i=0; i<a.length; i++)
{
a[i]=(int)Math.round(Math.random()*100);
System.out.println(i+"->"+a[i]);
{
if(i%10==9)
System.out.println();
}
}
}
public static void main(String[] args)
{
int [] a=new int[50];
randomInt900(a);
System.out.println("++++++++++++++++++++++++++++++++++++");
Arrays.sort(a);
for(int i=0; i<a.length; i++)
{
System.out.println(i+"->"+a[i]);
{
if(i%10==9)
System.out.println();
}
}
}
}
import java.io.*;
import java.util.*;
public class aa
{
public static void main(String[] args)
{
int[] a = new int[50];
for (int i=0; i < a.length ;i++)
{
a[i] = (int)(Math.random()*1000+1);
}
Arrays.sort(a);
for (int i=0;i<a.length;i++)
{
if (i%10==0)
System.out.print("\r");
System.out.print(a[i]+"\t");
}
System.out.println();
}
}
import java.io.*;
import java.util.*;
public class ex1
{
public static void main(String[] args)
{
int[] a = new int[50];
for (int i=0; i < a.length ;i++)
{
a[i] = (int)(Math.random()*1000+1);
}
Arrays.sort(a);
for (int i=0;i<a.length;i++)
{
if (i%10==0)
System.out.print("\r");
System.out.print(a[i]+"\t");
}
System.out.println();
}
}
import java.io.*;
import java.util.*;
public class ex1
{
public static void main(String[] args)
{
int[] a = new int[50];
for (int i=0; i < a.length ;i++)
{
a[i] = (int)(Math.random()*1000+1);
}
Arrays.sort(a);
for (int i=0;i<a.length;i++)
{
if (i%10==0)
System.out.print("\r");
System.out.print(a[i]+"\t");
}
System.out.println();
}
}
import java.util.*;
public class ex1 {
public static void randomInt1000(int []a)
{
for(int i=0;i<a.length;i++)
{
a[i]=(int)Math.round(Math.random()*1000);
System.out.print(i+"->"+a[i]+",");
if(i%10==9)
{
System.out.println("");
}
}
}
public static void main(String[] args)
{
int a[]=new int[50];
randomInt1000(a);
System.out.println("");
System.out.println("----------------------------------------------------------------------------------------------------------");
Arrays.sort(a);
for (int i=0;i<a.length;i++)
{
System.out.print(i+"->"+a[i]+",");
if(i%10==9)
{
System.out.println("");
}
}
}
}
import java.io.*;
import java.util.*;
public class java
{
public static void main(String[] args)
{
int[] a = new int[50];
⋯⋯ for (int i=0; i < a.length ;i++)
{
a[i] = (int)(Math.random()*1000+1);
}
Arrays.sort(a);
for (int i=0;i<a.length;i++)
{
System.out.print("\r");
System.out.print(a[i]+"\t");
}
System.out.println();
}
}
import java.io.*;
import java.util.*;
public class hello
{
public static void main(String[] args)
{
int[] a = new int[50];
⋯⋯ for (int i=0; i < a.length ;i++)
{
a[i] = (int)(Math.random()*1000+1);
}
Arrays.sort(a);
for (int i=0;i<a.length;i++)
{
System.out.print("\r");
System.out.print(a[i]+"\t");
}
System.out.println();
}
}
import java.io.*;
import java.util.*;
public class ket
{
public static void main(String[] args)
{
int[] a = new int[50];
⋯⋯ for (int i=0; i < a.length ;i++)
{
a[i] = (int)(Math.random()*1000+1);
}
Arrays.sort(a);
for (int i=0;i<a.length;i++)
{
System.out.print("\r");
System.out.print(a[i]+"\t");
}
System.out.println();
}
}
import java.io.*;
import java.util.*;
public class San
{
public static void main(String[] args)
{
int[] a = new int[50];
⋯⋯ for (int i=0; i < a.length ;i++)
{
a[i] = (int)(Math.random()*1000+1);
}
Arrays.sort(a);
for (int i=0;i<a.length;i++)
{
System.out.print("\r");
System.out.print(a[i]+"\t");
}
System.out.println();
}
}
import java.util.*;
public class hello123{
public static void main(String[] args){
int[] a = new int[50];
for (int i=0; i < a.length ;i++){
a[i] = (int)(Math.random()*1000+1);
}
Arrays.sort(a);
for (int i=0;i<a.length;i++){
if (i%10==0)
System.out.print("\r");
System.out.print(a[i]+"\t");
}
System.out.println();
}
}
import java.util.*;
public class hello123{
public static void main(String[] args){
int[] a = new int[50];
for (int i=0; i < a.length ;i++){
a[i] = (int)(Math.random()*1000+1);
}
Arrays.sort(a);
for (int i=0;i<a.length;i++){
if (i%10==0)
System.out.print("\r");
System.out.print(a[i]+"\t");
}
System.out.println();
}
}
import java.util.Arrays;
public class got {
public static void main(String[] args) {
int[] a=new int[50];
for(int i=0; i<a.length; i++){
a[i]=(int)(Math.random()*1000+1);
}
Arrays.sort(a);
for(int i=0; i<a.length; i++){
if (i%10==0)
System.out.print("\r");
System.out.print(a[i]+"\t");
}
System.out.println();
}
}
import java.util.*;
public class xxx{
public static void main(String[] args){
int[] a = new int[50];
for (int i=0; i < a.length ;i++){
a[i] = (int)(Math.random()*1000+1);
}
Arrays.sort(a);
for (int i=0;i<a.length;i++){
if (i%10==0)
System.out.print("\r");
System.out.print(a[i]+"\t");
}
System.out.println();
}
}
import java.io.*;
import java.util.*;
public class aa
{
public static void main(String[] args)
{
int[] a = new int[50];
for (int i=0; i < a.length ;i++)
{
a[i] = (int)(Math.random()*1000+1);
}
Arrays.sort(a);
for (int i=0;i<a.length;i++)
{
if (i%10==0)
System.out.print("\r");
System.out.print(i+1+"->"+a[i]+"\t");
}
System.out.println();
}
}
import java.io.*;
import java.util.*;
public class aa
{
public static void main(String[] args)
{
int[] a = new int[50];
for (int i=0; i < a.length ;i++)
{
a[i] = (int)(Math.random()*1000+1);
}
Arrays.sort(a);
for (int i=0;i<a.length;i++)
{
if (i%10==0)
System.out.print("\r");
System.out.print(i+1+"->"+a[i]+"\t");
}
System.out.println();
}
}
import java.util.Arrays;
import java.util.Random;
public class aa {
public static void pr(int a[])
{
for(int i=0; i<a.length;i++){
System.out.print(i+"->"+a[i]+"\t");
if (i%10==9) System.out.println();
}
}
public static void main(String[] args) {
int a[]=new int[50];
Random x=new Random();
for(int i=0;i<a.length;i++)
a[i]=x.nextInt(1001);
Arrays.sort(a);
pr(a);
}
}
import java.util.Arrays;
import java.util.Random;
public class aa {
public static void pr(int a[])
{
for(int i=0; i<a.length;i++){
System.out.print(i+"->"+a[i]+"\t");
if (i%10==9) System.out.println();
}
}
public static void main(String[] args) {
int a[]=new int[50];
Random x=new Random();
for(int i=0;i<a.length;i++)
a[i]=x.nextInt(1001);
Arrays.sort(a);
pr(a);
}
}
import java.util.*;
public class ex0530 {
public static void pr(int[] a) {
for(int i=0;i<a.length;i++){
System.out.print(i+"->"+a[i]+"\t");
if(i%10==9) System.out.println();
}
}
public static void main(String [] args){
int a[]=new int[50];
Random x=new Random();
for (int i=0;i<a.length;i++)
a[i]=x.nextInt(1001);
Arrays.sort(a);
pr(a);
}
}
import java.util.Arrays;
import java.util.Random;
public class aa {
public static void pr(int a[])
{
for(int i=0; i<a.length;i++){
System.out.print(i+"->"+a[i]+"\t");
if (i%10==9) System.out.println();
}
}
public static void main(String[] args) {
int a[]=new int[50];
Random x=new Random();
for(int i=0;i<a.length;i++)
a[i]=x.nextInt(1001);
Arrays.sort(a);
pr(a);
}
}
import java.io.*;
import java.util.*;
public class ex1
{
public static void main(String[] args)
{
int[] a = new int[50];
for (int i=0; i < a.length ;i++)
{
a[i] = (int)(Math.random()*1000+1);
}
Arrays.sort(a);
for (int i=0;i<a.length;i++)
{
if (i%10==0)
System.out.print("\r");
System.out.print(a[i]+"\t");
}
System.out.println();
}
}
import java.io.*;
import java.util.*;
public class NYPD{
public static void main(String[] args)
{
int[] a = new int[50];
for (int i=0; i < a.length ;i++)
{
a[i] = (int)(Math.random()*1000+1);
}
Arrays.sort(a);
for (int i=0;i<a.length;i++)
{
if (i%10==0)
System.out.print("\r");
System.out.print(a[i]+"\t");
}
System.out.println();
}
}
import java.io.*;
import java.util.*;
public class NYPD{
public static void main(String[] args)
{
int[] a = new int[50];
for (int i=0; i < a.length ;i++)
{
a[i] = (int)(Math.random()*1000+1);
}
Arrays.sort(a);
for (int i=0;i<a.length;i++)
{
if (i%10==0)
System.out.print("\r");
System.out.print(a[i]+"\t");
}
System.out.println();
}
}
import java.io.*;
import java.util.*;
public class aa
{
public static void main(String[] args)
{
int[] a = new int[50];
for (int i=0; i < a.length ;i++)
{
a[i] = (int)(Math.random()*1000+1);
}
Arrays.sort(a);
for (int i=0;i<a.length;i++)
{
System.out.print("\r");
System.out.print(a[i]+"\t");
}
System.out.println();
}
}
import java.io.*;
import java.util.*;
public class ex1
{
public static void main(String[] args)
{
int[] a = new int[50];
for (int i=0; i < a.length ;i++)
{
a[i] = (int)(Math.random()*1000+1);
}
Arrays.sort(a);
for (int i=0;i<a.length;i++)
{
if (i%10==0)
System.out.print("\r");
System.out.print(a[i]+"\t");
}
System.out.println();
}
}
import java.io.*;
import java.util.*;
public class test
{
public static void main(String[] args)
{
int[] a = new int[50];
for (int i=0; i < a.length ;i++)
{
a[i] = (int)(Math.random()*1000+1);
}
Arrays.sort(a);
for (int i=0;i<a.length;i++)
{
System.out.print("\r");
System.out.print(a[i]+"\t");
}
System.out.println();
}
}
import java.io.*;
import java.util.*;
public class app
{
public static void main(String[] args)
{
int[] a = new int[50];
for (int i=0; i < a.length ;i++)
{
a[i] = (int)(Math.random()*1000+1);
}
Arrays.sort(a);
for (int i=0;i<a.length;i++)
{
System.out.print("\r");
System.out.print(a[i]+"\t");
}
System.out.println();
}
}
import java.io.*;
import java.util.*;
public class aa
{
public static void main(String[] args)
{
int[] a = new int[50];
for (int i=0; i < a.length ;i++)
{
a[i] = (int)(Math.random()*1000+1);
}
Arrays.sort(a);
for (int i=0;i<a.length;i++)
{
System.out.print("\r");
System.out.print(a[i]+"\t");
}
System.out.println();
}
}
import java.io.*;
import java.util.*;
public class aa
{
public static void main(String[] args)
{
int[] a = new int[50];
for (int i=0; i < a.length ;i++)
{
a[i] = (int)(Math.random()*1000+1);
}
Arrays.sort(a);
for (int i=0;i<a.length;i++)
{
System.out.print("\r");
System.out.print(a[i]+"\t");
}
System.out.println();
}
}
import java.io.*;
import java.util.*;
public class pso2
{
public static void main(String[] args)
{
int[] a = new int[50];
for (int i=0; i < a.length ;i++)
{
a[i] = (int)(Math.random()*1000+1);
}
Arrays.sort(a);
for (int i=0;i<a.length;i++)
{
if (i%10==0)
System.out.print("\r");
System.out.print(a[i]+"\t");
}
System.out.println();
}
}
import java.io.*;
import java.util.*;
public class ex{
public static void main(String[] args)
{
int[] a = new int[50];
for (int i=0; i < a.length ;i++)
{
a[i] = (int)(Math.random()*1000+1);
}
Arrays.sort(a);
for (int i=0;i<a.length;i++)
{
if (i%10==0)
System.out.print("\r");
System.out.print(a[i]+"\t");
}
System.out.println();
}
}
import java.io.*;
import java.util.*;
public class aa
{
public static void main(String[] args)
{
int[] a = new int[50];
for (int i=0; i < a.length ;i++)
{
a[i] = (int)(Math.random()*1000+1);
}
Arrays.sort(a);
for (int i=0;i<a.length;i++)
{
System.out.print("\r");
System.out.print(a[i]+"\t");
}
System.out.println();
}
}
import java.util.*;
public class ex1 {
public static void randomInt1000(int []a)
{
for(int i=0;i"+a[i]+",");
if(i%10==9)
{
System.out.println("");
}
}
}
public static void main(String[] args)
{
int a[]=new int[50];
randomInt1000(a);
System.out.println("");
System.out.println("----------------------------------------------------------------------------------------------------------");
Arrays.sort(a);
for (int i=0;i"+a[i]+",");
if(i%10==9)
{
System.out.println("");
}
}
}
}
import java.io.*;
import java.util.*;
public class pso2
{
public static void main(String[] args)
{
int[] a = new int[50];
for (int i=0; i < a.length ;i++)
{
a[i] = (int)(Math.random()*1000+1);
}
Arrays.sort(a);
for (int i=0;i<a.length;i++)
{
if (i%10==0)
System.out.print("\r");
System.out.print(a[i]+"\t");
}
System.out.println();
}
}
import java.io.*;
import java.util.*;
public class aa
{
public static void main(String[] args)
{
int[] a = new int[50];
for (int i=0; i < a.length ;i++)
{
a[i] = (int)(Math.random()*1000+1);
}
Arrays.sort(a);
for (int i=0;i<a.length;i++)
{
System.out.print("\r");
System.out.print(a[i]+"\t");
}
System.out.println();
}
}
import java.io.*;
import java.util.*;
public class aa
{
public static void main(String[] args)
{
int[] a = new int[50];
for (int i=0; i < a.length ;i++)
{
a[i] = (int)(Math.random()*1000+1);
}
Arrays.sort(a);
for (int i=0;i<a.length;i++)
{
System.out.print("\r");
System.out.print(a[i]+"\t");
}
System.out.println();
}
}
import java.io.*;
import java.util.*;
public class aa
{
public static void main(String[] args)
{
int[] a = new int[50];
for (int i=0; i < a.length ;i++)
{
a[i] = (int)(Math.random()*1000+1);
}
Arrays.sort(a);
for (int i=0;i<a.length;i++)
{
System.out.print("\r");
System.out.print(a[i]+"\t");
}
System.out.println();
}
}
import java.io.*;
import java.util.*;
public class hello{
public static void main(String[] args)
{
int[] a = new int[50];
for (int i=0; i < a.length ;i++)
{
a[i] = (int)(Math.random()*1000+1);
}
Arrays.sort(a);
for (int i=0;i<a.length;i++)
{
if (i%10==0)
System.out.print("\r");
System.out.print(a[i]+"\t");
}
System.out.println();
}
}
import java.util.Arrays;
public class knmj {
public static void randomInt50(int[] a){
int i;
for(i=0;i<a.length;i++){
a[i]=(int)Math.round(Math.random()*100);
System.out.print(i+"->"+a[i]+" ");
}
}
public static void main(String[] args) {
int[] a=new int[50];
randomInt50(a);
System.out.println("");
for (int j=0;j<14;j++)
System.out.print("------------------");
System.out.println("");
Arrays.sort(a);
for(int i=0;i<a.length;i++)
System.out.print(i+"->"+a[i]+" ");
}
}
import java.io.*;
import java.util.*;
public class ex1
{
public static void main(String[] args)
{
int[] a = new int[50];
for (int i=0; i < a.length ;i++)
{
a[i] = (int)(Math.random()*1000+1);
}
Arrays.sort(a);
for (int i=0;i<a.length;i++)
{
if (i%10==0)
System.out.print("\r");
System.out.print(a[i]+"\t");
}
System.out.println();
}
}
import java.io.*;
import java.util.*;
public class aa
{
public static void main(String[] args)
{
int[] a = new int[50];
for (int i=0; i < a.length ;i++)
{
a[i] = (int)(Math.random()*1000+1);
}
Arrays.sort(a);
for (int i=0;i<a.length;i++)
{
System.out.print("\r");
System.out.print(a[i]+"\t");
}
System.out.println();
}
}
import java.io.*;
import java.util.*;
public class hello{
public static void main(String[] args)
{
int[] a = new int[50];
for (int i=0; i < a.length ;i++)
{
a[i] = (int)(Math.random()*1000+1);
}
Arrays.sort(a);
for (int i=0;i<a.length;i++)
{
if (i%10==0)
System.out.print("\r");
System.out.print(a[i]+"\t");
}
System.out.println();
}
}
import java.util.Arrays;
public class t0528 {
public static void randomInt50(int[] a){
int i;
for(i=0;i"+a[i]+" ");
}
}
public static void main(String[] args) {
int[] a=new int[50];
randomInt50(a);
System.out.println("");
for (int j=0;j<14;j++)
System.out.print("---------我是分隔線---------");
System.out.println("");
Arrays.sort(a);
for(int i=0;i"+a[i]+" ");
}
}
import java.util.Arrays;
public class t0528 {
public static void randomInt50(int[] a){
int i;
for(i=0;i"+a[i]+" ");
}
}
public static void main(String[] args) {
int[] a=new int[50];
randomInt50(a);
System.out.println("");
for (int j=0;j<14;j++)
System.out.print("---------我是分隔線---------");
System.out.println("");
Arrays.sort(a);
for(int i=0;i"+a[i]+" ");
}
}
import java.util.Arrays;
public class 123 {
public static void randomInt50(int[] a){
int i;
for(i=0;i"+a[i]+" ");
}
}
public static void main(String[] args) {
int[] a=new int[50];
randomInt50(a);
System.out.println("");
for (int j=0;j<14;j++)
System.out.print("---------我是分隔線---------");
System.out.println("");
Arrays.sort(a);
for(int i=0;i"+a[i]+" ");
}
}
張貼留言