結果
| 問題 |
No.2450 99-like Number
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-09-01 21:23:39 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 274 bytes |
| コンパイル時間 | 281 ms |
| コンパイル使用メモリ | 26,752 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2025-01-03 07:15:10 |
| 合計ジャッジ時間 | 1,126 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:9:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
9 | scanf("%s", s + 1);
| ~~~~~^~~~~~~~~~~~~
ソースコード
#include <cstdio>
#include <cstring>
int n;
char s[105];
int main()
{
scanf("%s", s + 1);
n = strlen(s + 1);
bool ans = true;
for (int i = 1; i <= n; ++i)
if (s[i] != '9')
ans = false;
if (ans)
puts("Yes");
else
puts("No");
return 0;
}