Submission #1551343
Source Code Expand
import java.util.ArrayList; import java.util.Scanner; import java.util.stream.IntStream; public class Main{ static IntStream REPS(int v){return IntStream.range(0,v);} static IntStream REPS(int l,int r){return IntStream.rangeClosed(l,r);} static IntStream INS(int n) {return REPS(n).map(i->getInt());} static Scanner s=new Scanner(System.in); static int getInt(){return Integer.parseInt(s.next());} public static void main(String[]$){ int n=getInt(); ArrayList<Integer>l=new ArrayList<>(); for(int i=1;true;++i) { if(i*2+1<=n) { l.add(i); n-=i; }else { l.add(n); break; } } l.forEach(System.out::println); } }
Submission Info
Submission Time | |
---|---|
Task | B - Exactly N points |
User | fal_rnd |
Language | Java8 (OpenJDK 1.8.0) |
Score | 0 |
Code Size | 677 Byte |
Status | WA |
Exec Time | 239 ms |
Memory | 27092 KB |
Judge Result
Set Name | sample | dataset1 | dataset2 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 200 | 0 / 100 | ||||||||||
Status |
|
|
|
Set Name | Test Cases |
---|---|
sample | sample-01.txt, sample-02.txt, sample-03.txt |
dataset1 | sample-01.txt, sample-02.txt, sample-03.txt, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt, 01-09.txt, 01-10.txt |
dataset2 | sample-01.txt, sample-02.txt, sample-03.txt, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt, 01-09.txt, 01-10.txt, 02-01.txt, 02-02.txt, 02-03.txt, 02-04.txt, 02-05.txt, 02-06.txt, 02-07.txt, 02-08.txt, sample-01.txt, sample-02.txt, sample-03.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
01-01.txt | AC | 200 ms | 26580 KB |
01-02.txt | AC | 178 ms | 24404 KB |
01-03.txt | WA | 165 ms | 26324 KB |
01-04.txt | WA | 163 ms | 27092 KB |
01-05.txt | WA | 167 ms | 26196 KB |
01-06.txt | WA | 164 ms | 26444 KB |
01-07.txt | AC | 159 ms | 26580 KB |
01-08.txt | WA | 171 ms | 24404 KB |
01-09.txt | AC | 163 ms | 24148 KB |
01-10.txt | WA | 161 ms | 24404 KB |
02-01.txt | WA | 235 ms | 22740 KB |
02-02.txt | AC | 231 ms | 24612 KB |
02-03.txt | AC | 239 ms | 26196 KB |
02-04.txt | WA | 221 ms | 24916 KB |
02-05.txt | WA | 214 ms | 24788 KB |
02-06.txt | WA | 203 ms | 26064 KB |
02-07.txt | WA | 191 ms | 24016 KB |
02-08.txt | WA | 229 ms | 26580 KB |
sample-01.txt | AC | 167 ms | 26192 KB |
sample-02.txt | AC | 177 ms | 23892 KB |
sample-03.txt | AC | 171 ms | 22996 KB |