結果

問題 No.192 合成数
コンテスト
ユーザー yoza
提出日時 2015-04-26 22:14:57
言語 Nim
(2.2.0)
結果
WA  
実行時間 -
コード長 250 bytes
コンパイル時間 3,062 ms
コンパイル使用メモリ 65,024 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-29 01:52:25
合計ジャッジ時間 7,018 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1
other AC * 2 WA * 23
権限があれば一括ダウンロードができます
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 39) Warning: imported and not used: 'math' [UnusedImport]
/home/judge/data/code/Main.nim(1, 18) Warning: imported and not used: 'sequtils' [UnusedImport]
/home/judge/data/code/Main.nim(1, 28) Warning: imported and not used: 'algorithm' [UnusedImport]

ソースコード

diff #

import strutils, sequtils, algorithm, math

let
  n = readLine(stdin).parseInt

var
  flag = false

for x in countup(n - 100, n + 100):
  for y in countup(2, x - 1):
    if y != x and x mod y == 0:
      echo(x)
      flag = true
  if flag:
    break
0