Submission #5021970
Source Code Expand
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <time.h> #define _CRT_SECURE_NO_WARNINGS #define TLong long long #define TBMod 1000000007 int main(int argc, char const *argv[]) { TLong n,y; scanf("%lld%lld",&n,&y); for (TLong i = 0; i <= y / 10000; ++i) { for (TLong j = 0; j <= y / 5000; ++j) { for (TLong k = 0; k <= y / 1000; ++k) { if(10000 * i + 5000 * j + 1000 * k == y && i + j + k == n){ printf("%d %d %d\n", i,j,k); return 0; } } } } puts("-1 -1 -1"); return 0; }
Submission Info
Submission Time | |
---|---|
Task | C - Otoshidama |
User | herp_sy |
Language | C (GCC 5.4.1) |
Score | 0 |
Code Size | 585 Byte |
Status | TLE |
Exec Time | 2103 ms |
Memory | 128 KB |
Compile Error
./Main.c: In function ‘main’: ./Main.c:23:13: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long long int’ [-Wformat=] printf("%d %d %d\n", i,j,k); ^ ./Main.c:23:13: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long long int’ [-Wformat=] ./Main.c:23:13: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘long long int’ [-Wformat=] ./Main.c:14:2: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result] scanf("%lld%lld",&n,&y); ^
Judge Result
Set Name | Sample | All | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 300 | ||||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | a01, a02, a03, a04 |
All | a01, a02, a03, a04, b05, b06, b07, b08, b09, b10, b11, b12, b13, b14, b15, b16, b17, b18, b19, b20, b21, b22, b23, b24 |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
a01 | AC | 1 ms | 128 KB |
a02 | AC | 1 ms | 128 KB |
a03 | AC | 1 ms | 128 KB |
a04 | TLE | 2103 ms | 128 KB |
b05 | AC | 1 ms | 128 KB |
b06 | AC | 1 ms | 128 KB |
b07 | AC | 1 ms | 128 KB |
b08 | AC | 1 ms | 128 KB |
b09 | TLE | 2103 ms | 128 KB |
b10 | AC | 106 ms | 128 KB |
b11 | TLE | 2103 ms | 128 KB |
b12 | AC | 1 ms | 128 KB |
b13 | AC | 2 ms | 128 KB |
b14 | AC | 2 ms | 128 KB |
b15 | TLE | 2103 ms | 128 KB |
b16 | TLE | 2103 ms | 128 KB |
b17 | TLE | 2103 ms | 128 KB |
b18 | AC | 1 ms | 128 KB |
b19 | AC | 27 ms | 128 KB |
b20 | AC | 8 ms | 128 KB |
b21 | AC | 109 ms | 128 KB |
b22 | AC | 102 ms | 128 KB |
b23 | TLE | 2103 ms | 128 KB |
b24 | TLE | 2103 ms | 128 KB |