結果
| 問題 |
No.547 未知の言語
|
| コンテスト | |
| ユーザー |
Haijinn
|
| 提出日時 | 2017-07-29 17:54:13 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 307 bytes |
| コンパイル時間 | 183 ms |
| コンパイル使用メモリ | 20,864 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-26 02:20:52 |
| 合計ジャッジ時間 | 1,086 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 33 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:10:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
10 | scanf("%d",&n);
| ^~~~~~~~~~~~~~
main.c:12:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
12 | scanf("%s",s[i]);
| ^~~~~~~~~~~~~~~~
main.c:16:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
16 | scanf("%s",t[i]);
| ^~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
#include<string.h>
int main(){
int n;
char s[11][100];
char t[11][100];
int i,j;
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%s\n%s\n",i+1,s[i],t[i]);
}
}
return 0;
}
Haijinn