結果
| 問題 |
No.2450 99-like Number
|
| コンテスト | |
| ユーザー |
suppy193
|
| 提出日時 | 2023-09-02 19:29:55 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 198 bytes |
| コンパイル時間 | 177 ms |
| コンパイル使用メモリ | 20,224 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-12 01:53:58 |
| 合計ジャッジ時間 | 955 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 13 WA * 5 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:8:15: warning: too many arguments for format [-Wformat-extra-args]
8 | scanf("$s", s);
| ^~~~
main.c:9:24: warning: comparison between pointer and integer
9 | for(i = 0;s[i] != "\0";i++){
| ^~
main.c:10:25: warning: comparison between pointer and integer
10 | if(s[i] != "9"){
| ^~
main.c:8:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
8 | scanf("$s", s);
| ^~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
int main(void){
int i;
char s[100];
scanf("$s", s);
for(i = 0;s[i] != "\0";i++){
if(s[i] != "9"){
printf("No\n");
return 0;
}
}
printf("Yes\n");
return 0;
}
suppy193