Submission #20540905
Source Code Expand
function main(input) {
input = input.split(" ");
var A = parseInt(input[0], 10);
var B = parseInt(input[1], 10);
const result = (((1 * 10) - (B / A * 10))/10) * 100;
if(Number.isInteger(result)) {
console.log(result.toFixed(1))
} else {
console.log(result)
}
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));
Submission Info
| Submission Time | |
|---|---|
| Task | A - Discount |
| User | tyng |
| Language | JavaScript (Node.js 12.16.1) |
| Score | 100 |
| Code Size | 374 Byte |
| Status | AC |
| Exec Time | 205 ms |
| Memory | 30380 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 01_sample.txt, 02_sample.txt, 03_sample.txt |
| All | 01_sample.txt, 02_sample.txt, 03_sample.txt, 04_hand.txt, 05_hand.txt, 06_hand.txt, 07_random.txt, 08_random.txt, 09_random.txt, 10_random.txt, 11_random.txt, 12_random.txt, 13_random.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 01_sample.txt | AC | 205 ms | 30380 KiB |
| 02_sample.txt | AC | 49 ms | 29364 KiB |
| 03_sample.txt | AC | 48 ms | 29432 KiB |
| 04_hand.txt | AC | 48 ms | 29472 KiB |
| 05_hand.txt | AC | 44 ms | 29368 KiB |
| 06_hand.txt | AC | 48 ms | 29384 KiB |
| 07_random.txt | AC | 48 ms | 29424 KiB |
| 08_random.txt | AC | 48 ms | 29444 KiB |
| 09_random.txt | AC | 48 ms | 29352 KiB |
| 10_random.txt | AC | 52 ms | 29396 KiB |
| 11_random.txt | AC | 52 ms | 29352 KiB |
| 12_random.txt | AC | 52 ms | 29360 KiB |
| 13_random.txt | AC | 52 ms | 29448 KiB |