結果
| 問題 | No.3240 Count 8 Included Numbers (Easy) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-08-22 21:01:29 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| + 329µs | |
| コード長 | 233 bytes |
| 記録 | |
| コンパイル時間 | 930 ms |
| コンパイル使用メモリ | 149,276 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-14 06:56:11 |
| 合計ジャッジ時間 | 2,228 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 16 |
ソースコード
#include <iostream>
int main() {
int N;
std::cin >> N;
int count = 0;
for (int i = 8; i <= N; i++) {
if (i % 10 == 8 || i / 10 % 10 == 8 || i / 100 == 8) count++;
}
std::cout << count << std::endl;
}