标签:%s pwd next 穷举 scanner lis The you str
import java.util.Scanner; public class TestScanner { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.print("Password: "); long password = scanner.nextLong(); long pwd = 0; long t1 = System.currentTimeMillis(); while (pwd != password) { ++pwd; } long t2 = System.currentTimeMillis(); System.out.printf("The password you entered is %s\n", password); System.out.printf("elapsed time: %s ms", (t2 - t1)); scanner.close(); } }
标签:%s pwd next 穷举 scanner lis The you str
原文地址:https://www.cnblogs.com/Satu/p/9797203.html