結果

問題 No.1849 Three Times Value
ユーザー ripityripity
提出日時 2022-02-24 22:36:49
言語 Java21
(openjdk 21)
結果
AC  
実行時間 290 ms / 2,000 ms
コード長 711 bytes
コンパイル時間 2,306 ms
コンパイル使用メモリ 74,140 KB
実行使用メモリ 60,264 KB
最終ジャッジ日時 2023-09-15 10:14:42
合計ジャッジ時間 9,385 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 164 ms
56,640 KB
testcase_01 AC 164 ms
56,660 KB
testcase_02 AC 178 ms
54,884 KB
testcase_03 AC 164 ms
57,008 KB
testcase_04 AC 165 ms
56,900 KB
testcase_05 AC 164 ms
56,956 KB
testcase_06 AC 283 ms
60,264 KB
testcase_07 AC 163 ms
54,668 KB
testcase_08 AC 162 ms
59,128 KB
testcase_09 AC 286 ms
59,752 KB
testcase_10 AC 290 ms
59,996 KB
testcase_11 AC 284 ms
59,908 KB
testcase_12 AC 288 ms
60,124 KB
testcase_13 AC 225 ms
59,652 KB
testcase_14 AC 213 ms
59,376 KB
testcase_15 AC 176 ms
56,940 KB
testcase_16 AC 286 ms
60,000 KB
testcase_17 AC 228 ms
59,348 KB
testcase_18 AC 164 ms
56,984 KB
testcase_19 AC 162 ms
56,760 KB
testcase_20 AC 162 ms
57,024 KB
testcase_21 AC 164 ms
56,564 KB
testcase_22 AC 161 ms
56,468 KB
testcase_23 AC 168 ms
57,124 KB
testcase_24 AC 178 ms
56,932 KB
testcase_25 AC 167 ms
57,044 KB
testcase_26 AC 180 ms
56,940 KB
testcase_27 AC 231 ms
59,328 KB
testcase_28 AC 164 ms
56,688 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.io.*;

public class Main {
    
    public static Scanner sc = new Scanner(System.in);
    public static PrintWriter pw = new PrintWriter(System.out);
    
    public static void main(String[] args) {
        
        int t = 1;
        while( t > 0 ) {
            solve();
            t--;
        }
        
        pw.flush();
        
    }
    
    static void solve() {
        
        long N = sc.nextLong();
        long ans = 0;
        for( long d = 1; d <= 100000; d++,ans++ ) {
            long ttv = Long.valueOf(Long.toString(d)+Long.toString(d)+Long.toString(d));
            if( ttv > N ) break;
        }
        
        pw.println(ans);
        
    }
    
}
0