結果
| 問題 |
No.3240 Count 8 Included Numbers (Easy)
|
| コンテスト | |
| ユーザー |
ゼリトキ
|
| 提出日時 | 2025-08-22 21:01:34 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 492 bytes |
| コンパイル時間 | 2,714 ms |
| コンパイル使用メモリ | 276,204 KB |
| 実行使用メモリ | 7,720 KB |
| 最終ジャッジ日時 | 2025-08-22 21:01:41 |
| 合計ジャッジ時間 | 3,534 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 16 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define ll long long
const long long mod=998244353;
const long long hmod=46216567629137;
int main(){
cin.tie(0)->sync_with_stdio(0);
cout.tie(0);
int N;
cin>>N;
int cnt=0;
for(int i=1;i<=N;i++){
string s=to_string(i);
bool check=0;
rep(j,s.size()){
if(s[j]=='8') check=1;
}
if(check) cnt++;
}
cout<<cnt<<endl;
}
ゼリトキ