Submission #00155


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <stdio.h>
int main (void)
{
int n, p, d1, d2, i=0, hp, hd1=0, hd2=0;
scanf_s("%d",&n);
while(n>0)
{
for (i; i<n; i++)
{
scanf_s("%d %d %d",&p ,&d1 ,&d2);
if(hd1+hd2<d1+d2)
{
hp=p;
hd1=d1;
hd2=d2;
}
}
printf("%d %d\n",hp ,hd1+hd2);
i=0;
hd1=0;
hd2=0;
scanf_s("%d",&n);
}
return 0;
}

ステータス

項目 データ
問題 0002 - 病院でウォーキング
ユーザー名 sth1539
投稿日時 2016-08-29 09:55:45
言語 C
状態 Compile Error
得点 0
ソースコード長 360 Byte
最大実行時間 -
最大メモリ使用量

コンパイルメッセージ

./Main.c: In function ‘main’:
./Main.c:5:9: warning: implicit declaration of function ‘scanf_s’ [-Wimplicit-function-declaration]
         scanf_s("%d",&n);
         ^
/tmp/ccAovi96.o: In function `main':
Main.c:(.text.startup+0x1b): undefined reference to `scanf_s'
Main.c:(.text.startup+0x47): undefined reference to `scanf_s'
collect2: error: ld returned 1 exit status

セット

セット 得点 Cases

テストケース

ファイル名 状態 実行時間 メモリ使用量 #