結果

問題 No.3240 Count 8 Included Numbers (Easy)
ユーザー Maeda
提出日時 2025-08-26 09:09:19
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 298 bytes
コンパイル時間 5,458 ms
コンパイル使用メモリ 75,892 KB
実行使用メモリ 46,824 KB
最終ジャッジ日時 2025-08-26 09:09:28
合計ジャッジ時間 7,414 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 3
other AC * 3 WA * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int count = 0;
		for(int i = 0 ; i < n ; i++){
			if( i % 10 == 8 || i / 10 == 8 ){
				count++; 
			}
		}
		System.out.println(count);
    }
}
0