結果

問題 No.207 世界のなんとか
ユーザー hum_ophum_op
提出日時 2016-03-31 00:02:14
言語 F#
(F# 4.0)
結果
AC  
実行時間 343 ms / 5,000 ms
コード長 504 bytes
コンパイル時間 7,057 ms
コンパイル使用メモリ 187,400 KB
実行使用メモリ 35,744 KB
最終ジャッジ日時 2024-04-17 16:42:37
合計ジャッジ時間 14,447 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 338 ms
34,952 KB
testcase_01 AC 340 ms
35,724 KB
testcase_02 AC 336 ms
35,744 KB
testcase_03 AC 337 ms
34,936 KB
testcase_04 AC 339 ms
35,712 KB
testcase_05 AC 340 ms
34,828 KB
testcase_06 AC 335 ms
35,592 KB
testcase_07 AC 336 ms
35,716 KB
testcase_08 AC 336 ms
34,932 KB
testcase_09 AC 337 ms
34,852 KB
testcase_10 AC 339 ms
35,584 KB
testcase_11 AC 336 ms
35,460 KB
testcase_12 AC 343 ms
35,564 KB
testcase_13 AC 336 ms
35,716 KB
testcase_14 AC 338 ms
35,676 KB
testcase_15 AC 339 ms
35,712 KB
testcase_16 AC 338 ms
35,740 KB
testcase_17 AC 338 ms
34,856 KB
testcase_18 AC 55 ms
30,464 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (230 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.NET)
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

open System
open System.Text

let isThree n:int =
    let mutable num = n
    let mutable ret = 0
    while num > 0 do
        if num % 10 = 3 then
            num <- 0
            ret <- 1
        
        num <- num / 10
    ret
    
      
[<EntryPoint>]
let main args =    
    let IN = Console.ReadLine().Split(' ')
    let A, B = Int32.Parse(IN.[0]), Int32.Parse(IN.[1])
    
    for x = A to B do
        if x % 3 = 0 || isThree(x) = 1 then
            printfn "%d" x
    done
        
    0
    
0