結果
| 問題 |
No.201 yukicoderじゃんけん
|
| コンテスト | |
| ユーザー |
suppy193
|
| 提出日時 | 2015-05-27 11:43:50 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 345 bytes |
| コンパイル時間 | 271 ms |
| コンパイル使用メモリ | 20,224 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-06 10:38:08 |
| 合計ジャッジ時間 | 3,327 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 WA * 1 RE * 16 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:10:9: warning: implicit declaration of function ‘gets’; did you mean ‘fgets’? [-Wimplicit-function-declaration]
10 | gets(str);
| ^~~~
| fgets
/usr/bin/ld: /tmp/ccufmhVR.o: in function `main':
main.c:(.text.startup+0x3b): 警告: the `gets' function is dangerous and should not be used.
ソースコード
#include <stdio.h>
int main(void)
{
char str[200];
char sa[101], sb[101];
long long int pa, pb;
char xa, xb;
gets(str);
sscanf(str, "%s%lld%c", sa, &pa, &xa);
gets(str);
sscanf("%s%lld%c", sb, &pb, &xb);
//printf("%lld\n", pa);
if(pa > pb)printf("%s\n", sa);
else if(pa < pb)printf("%s\n", sb);
else printf("-1\n");
return 0;
}
suppy193