結果
| 問題 |
No.494 yukicoder
|
| コンテスト | |
| ユーザー |
sasa
|
| 提出日時 | 2025-03-13 17:12:00 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 233 bytes |
| コンパイル時間 | 446 ms |
| コンパイル使用メモリ | 25,216 KB |
| 実行使用メモリ | 7,328 KB |
| 最終ジャッジ日時 | 2025-03-13 17:12:02 |
| 合計ジャッジ時間 | 1,318 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 7 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:7:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%s",str);
| ^~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
#include <string.h>
int main(){
char *ans = "yukicoder";
char str[10] = "test";
scanf("%s",str);
int len = strlen(str);
for(int i = 0;i < len;i++){
if(str[i] == '?'){
printf("%c",*(str + 1));
}
}
}
sasa