結果
| 問題 |
No.809 かけ算
|
| コンテスト | |
| ユーザー |
Maeda
|
| 提出日時 | 2025-03-10 15:21:39 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 310 bytes |
| コンパイル時間 | 502 ms |
| コンパイル使用メモリ | 25,472 KB |
| 実行使用メモリ | 812,800 KB |
| 最終ジャッジ日時 | 2025-03-10 15:21:42 |
| 合計ジャッジ時間 | 3,309 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | WA * 2 MLE * 1 -- * 3 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:5:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | scanf("%d",&n);
| ^~~~~~~~~~~~~~
main.c:9:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
9 | scanf("%s",str[i]);
| ^~~~~~~~~~~~~~~~~~
main.c:12:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
12 | scanf("%s",ans);
| ^~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
#include <string.h>
void main(void){
int n = 0;
scanf("%d",&n);
char str[n][100];
char ans[100] = "";
for(int i = 0 ; i < n ; i++){
scanf("%s",str[i]);
}
for(int i = 0 ; i < n ; i++){
scanf("%s",ans);
if(strcmp(str[i],ans) != 0){
printf("%d\n%s\n%s",i+1,str[i],ans);
}
}
}
Maeda