結果
問題 | No.547 未知の言語 |
ユーザー |
![]() |
提出日時 | 2017-08-08 20:55:05 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 432 bytes |
コンパイル時間 | 110 ms |
コンパイル使用メモリ | 20,864 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-26 02:32:06 |
合計ジャッジ時間 | 1,114 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 33 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:8:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 8 | scanf("%d",&n); | ^~~~~~~~~~~~~~ main.c:11:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 11 | scanf("%s",s[i]); | ^~~~~~~~~~~~~~~~ main.c:17:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 17 | scanf("%s",t[i]); | ^~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> #include <string.h> int main(void){ int n; char s[10][21]; char t[10][21]; int i; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%s",s[i]); } for(i=0;i<n;i++){ scanf("%s",t[i]); } for(i=0;i<n;i++){ if(strcmp(s[i],t[i])!=0){ printf("%d\n",i+1); printf("%s\n",s[i]); printf("%s\n",t[i]); } } return 0; }