結果
問題 | No.224 文字列変更(easy) |
ユーザー |
|
提出日時 | 2015-06-12 22:43:17 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 293 bytes |
コンパイル時間 | 507 ms |
コンパイル使用メモリ | 20,224 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-06 20:21:09 |
合計ジャッジ時間 | 1,088 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 WA * 1 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:7:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | scanf("%d%*c",&n); | ^~~~~~~~~~~~~~~~~ main.c:8:5: warning: ignoring return value of ‘fgets’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 8 | fgets(s,sizeof(s),stdin); | ^~~~~~~~~~~~~~~~~~~~~~~~ main.c:9:5: warning: ignoring return value of ‘fgets’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 9 | fgets(t,sizeof(t),stdin); | ^~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> int main(){ int n; int i; char s[1001],t[1001]; scanf("%d%*c",&n); fgets(s,sizeof(s),stdin); fgets(t,sizeof(t),stdin); i=0; while(s[i]){ if(s[i]==t[i]) n--; i++; } printf("%d\n",n+1); return 0; }