結果

問題 No.547 未知の言語
ユーザー butsurizuki
提出日時 2017-04-02 23:18:40
言語 C90
(gcc 12.3.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 297 bytes
コンパイル時間 672 ms
コンパイル使用メモリ 20,736 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-26 01:37:24
合計ジャッジ時間 1,651 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 33
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:7:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    7 |         scanf("%d",&n);
      |         ^~~~~~~~~~~~~~
main.c:8:31: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    8 |         for(i = 1;i <= n;i++){scanf("%s",s[i]);}
      |                               ^~~~~~~~~~~~~~~~
main.c:9:31: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    9 |         for(i = 1;i <= n;i++){scanf("%s",t[i]);}
      |                               ^~~~~~~~~~~~~~~~

ソースコード

diff #

#include<stdio.h>
#include<string.h>

int main(void){
	int n,i;
	char s[16][32],t[16][32];
	scanf("%d",&n);
	for(i = 1;i <= n;i++){scanf("%s",s[i]);}
	for(i = 1;i <= n;i++){scanf("%s",t[i]);}
	for(i = 1;i <= n;i++){
		if(strcmp(s[i],t[i]) != 0){printf("%d\n%s\n%s\n",i,s[i],t[i]);}
	}
	return 0;
}
0