Submission #3451858
Source Code Expand
function search(num) { if (num < 1) { return num; } const sqrt = Math.sqrt(num); if (Number.isInteger(sqrt)) { return num; } else { return search(num - 1); } } function main(input) { const result = search(Number(input)) console.log(result); } main(require('fs').readFileSync('/dev/stdin', 'utf8'))
Submission Info
Submission Time | |
---|---|
Task | B - Around Square |
User | sskyu |
Language | JavaScript (node.js v5.12) |
Score | 0 |
Code Size | 348 Byte |
Status | RE |
Exec Time | 53 ms |
Memory | 8524 KB |
Judge Result
Set Name | Sample | All | ||||||
---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 200 | ||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | s1.txt, s2.txt, s3.txt |
All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, s1.txt, s2.txt, s3.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
01.txt | AC | 51 ms | 7372 KB |
02.txt | AC | 51 ms | 7372 KB |
03.txt | AC | 51 ms | 7372 KB |
04.txt | AC | 51 ms | 7372 KB |
05.txt | AC | 51 ms | 7372 KB |
06.txt | AC | 51 ms | 7372 KB |
07.txt | RE | 53 ms | 8524 KB |
08.txt | AC | 51 ms | 7372 KB |
09.txt | RE | 52 ms | 8396 KB |
10.txt | RE | 53 ms | 8396 KB |
11.txt | AC | 51 ms | 7372 KB |
12.txt | RE | 52 ms | 8396 KB |
13.txt | RE | 52 ms | 8396 KB |
14.txt | AC | 52 ms | 7756 KB |
s1.txt | AC | 51 ms | 7372 KB |
s2.txt | AC | 51 ms | 7372 KB |
s3.txt | AC | 53 ms | 7884 KB |