結果
| 問題 | 
                            No.201 yukicoderじゃんけん
                             | 
                    
| コンテスト | |
| ユーザー | 
                             TLwiegehtt
                         | 
                    
| 提出日時 | 2015-07-08 02:32:40 | 
| 言語 | C90  (gcc 12.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 408 bytes | 
| コンパイル時間 | 123 ms | 
| コンパイル使用メモリ | 20,352 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-07-08 01:37:34 | 
| 合計ジャッジ時間 | 899 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 17 WA * 3 | 
コンパイルメッセージ
main.c: In function ‘main’:
main.c:10:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   10 |         scanf("%s %s %s", nameA, pointA, handA);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:11:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   11 |         scanf("%s %s %s", nameB, pointB, handB);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            
            ソースコード
#include <stdio.h>
#include <string.h>
int main(void){
	int ret;
	char nameA[110], nameB[110];
	char pointA[11000], pointB[11000];
	char handA[10], handB[10];
	
	scanf("%s %s %s", nameA, pointA, handA);
	scanf("%s %s %s", nameB, pointB, handB);
	
	ret = strcmp(pointA, pointB);
	if( ret > 0 ){
		printf("%s\n", nameA);
	}else if(ret < 0){
		printf("%s\n", nameB);
	}else{
		printf("-1\n");
	}
	
	return 0;
}
            
            
            
        
            
TLwiegehtt