結果
| 問題 | No.192 合成数 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-04-04 22:10:56 |
| 言語 | Nim (2.2.8) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 250 bytes |
| 記録 | |
| コンパイル時間 | 3,091 ms |
| コンパイル使用メモリ | 67,200 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2026-03-20 00:51:25 |
| 合計ジャッジ時間 | 3,528 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 25 |
コンパイルメッセージ
/home/judge/data/code/Main.nim(8, 5) Warning: Using an unnamed break in a block is deprecated; Use a named block with a named break instead [UnnamedBreak] /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]
ソースコード
import strutils, sequtils, algorithm, math
var n = readLine(stdin).parseInt
block:
if n mod 2 == 0:
echo n
break
else:
for i in (n - 100) .. (n + 100):
if (i > 0 and i mod 2 == 0) and not (i == 2):
echo i
break