結果
問題 |
No.201 yukicoderじゃんけん
|
ユーザー |
![]() |
提出日時 | 2015-05-03 23:47:54 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 278 bytes |
コンパイル時間 | 261 ms |
コンパイル使用メモリ | 19,840 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-05 17:54:21 |
合計ジャッジ時間 | 890 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 17 WA * 3 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:13:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 13 | scanf("%s %s %*s %s %s %*s", SA, PA, SB, PB); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> #include <string.h> char SA[101]; char SB[101]; char PA[10001]; char PB[10001]; int main(void) { int order; scanf("%s %s %*s %s %s %*s", SA, PA, SB, PB); order = strcmp(PA, PB); printf("%s", order > 0 ? SA : order < 0 ? SB : "-1"); return 0; }