結果
問題 | No.547 未知の言語 |
ユーザー |
![]() |
提出日時 | 2025-03-17 13:38:18 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 324 bytes |
コンパイル時間 | 356 ms |
コンパイル使用メモリ | 25,472 KB |
実行使用メモリ | 7,324 KB |
最終ジャッジ日時 | 2025-03-17 13:38:20 |
合計ジャッジ時間 | 1,500 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 33 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:6:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%d",&val); | ^~~~~~~~~~~~~~~~ main.c:12:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 12 | scanf("%s",str[i]); | ^~~~~~~~~~~~~~~~~~ main.c:16:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 16 | scanf("%s",ans); | ^~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> #include <string.h> int main(){ int val = 0; scanf("%d",&val); char str[val][100]; char ans[100] = ""; for(int i = 0 ; i < val ; i++){ scanf("%s",str[i]); } for(int i = 0 ; i < val ; i++){ scanf("%s",ans); if(strcmp(str[i],ans) != 0){ printf("%d\n%s\n%s",i + 1,str[i],ans); } } }