Submission #4668391
Source Code Expand
#include <cstdio> int main(){ int N, Y; scanf("%d %d", &N, &Y); Y = Y / 1000; for(int x = 0; x <= N; x++){ for(int y = 0; y <= N - x; y++){ for(int z = 0; z <= N - x - y; z++){ if(x * 10 + y * 5 + z == Y){ printf("%d %d %d", x, y, z); return 0; } } } } printf("-1 -1 -1"); return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - Already 2018 |
User | mai2192 |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 447 Byte |
Status | WA |
Exec Time | 1 ms |
Memory | 128 KB |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:5:27: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d %d", &N, &Y); ^
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 100 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | a01, a02 |
All | a01, a02, b03, b04, b05, b06, b07, b08 |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
a01 | WA | 0 ms | 128 KB |
a02 | WA | 0 ms | 128 KB |
b03 | WA | 0 ms | 128 KB |
b04 | WA | 1 ms | 128 KB |
b05 | WA | 1 ms | 128 KB |
b06 | WA | 1 ms | 128 KB |
b07 | WA | 1 ms | 128 KB |
b08 | WA | 1 ms | 128 KB |