Submission #2559199
Source Code Expand
import java.util.Scanner; import java.util.TreeSet; public class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); TreeSet<Integer> expo = new TreeSet<>(); for(int i = 1; i < x; i++) { for(int n = 2; n < 10; n++) { double result = Math.pow((double)i,(double)n); if(result > x) { continue; }else { expo.add((int)result); } } } System.out.println(expo.last()); } }
Submission Info
Submission Time | |
---|---|
Task | B - Exponential |
User | hatchet |
Language | Java8 (OpenJDK 1.8.0) |
Score | 0 |
Code Size | 494 Byte |
Status | RE |
Exec Time | 98 ms |
Memory | 21844 KB |
Judge Result
Set Name | Sample | All | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 200 | ||||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 0_000.txt, 0_001.txt, 0_002.txt |
All | 0_000.txt, 0_001.txt, 0_002.txt, 1_003.txt, 1_004.txt, 1_005.txt, 1_006.txt, 1_007.txt, 1_008.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
0_000.txt | AC | 98 ms | 19284 KB |
0_001.txt | RE | 93 ms | 21844 KB |
0_002.txt | AC | 94 ms | 19796 KB |
1_003.txt | AC | 94 ms | 19284 KB |
1_004.txt | AC | 95 ms | 18644 KB |
1_005.txt | AC | 94 ms | 19668 KB |
1_006.txt | AC | 94 ms | 19284 KB |
1_007.txt | AC | 95 ms | 17748 KB |
1_008.txt | AC | 96 ms | 19540 KB |