Submission #480182
Source Code Expand
#include <stdio.h>
int main() {
int n[5],i;
int a, b;
scanf("%d %d %d %d %d\n",n,n+1,n+2,n+3,n+4);
a = n[0] + n[3] + n[4];
b = n[1] + n[2] + n[4];
printf("%d\n", (a > b) ? a : b);
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | C - 数を3つ選ぶマン |
| User | jonson |
| Language | C (GCC 4.9.2) |
| Score | 100 |
| Code Size | 218 Byte |
| Status | AC |
| Exec Time | 23 ms |
| Memory | 800 KiB |
Compile Error
./Main.c: In function ‘main’:
./Main.c:7:2: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d %d %d %d\n",n,n+1,n+2,n+3,n+4);
^
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | example_0.txt, example_1.txt |
| All | example_0.txt, example_1.txt, handmade_0.txt, handmade_1.txt, handmade_2.txt, handmade_3.txt, handmade_4.txt, handmade_5.txt, random_0.txt, random_1.txt, random_2.txt, random_3.txt, random_4.txt, example_0.txt, example_1.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| example_0.txt | AC | 21 ms | 708 KiB |
| example_1.txt | AC | 21 ms | 800 KiB |
| handmade_0.txt | AC | 21 ms | 796 KiB |
| handmade_1.txt | AC | 21 ms | 800 KiB |
| handmade_2.txt | AC | 21 ms | 792 KiB |
| handmade_3.txt | AC | 21 ms | 704 KiB |
| handmade_4.txt | AC | 21 ms | 792 KiB |
| handmade_5.txt | AC | 21 ms | 708 KiB |
| random_0.txt | AC | 23 ms | 796 KiB |
| random_1.txt | AC | 21 ms | 792 KiB |
| random_2.txt | AC | 23 ms | 696 KiB |
| random_3.txt | AC | 21 ms | 704 KiB |
| random_4.txt | AC | 21 ms | 704 KiB |