結果
| 問題 |
No.1339 循環小数
|
| コンテスト | |
| ユーザー |
chaemon
|
| 提出日時 | 2020-11-28 14:51:26 |
| 言語 | Nim (2.2.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 901 bytes |
| コンパイル時間 | 2,943 ms |
| コンパイル使用メモリ | 73,084 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-13 01:48:40 |
| 合計ジャッジ時間 | 3,886 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | WA * 36 |
ソースコード
{.hints:off checks:off warnings:off assertions:on optimization:speed.}
import algorithm, sequtils, tables, macros, math, sets, strutils, strformat, sugar
when defined(MYDEBUG):
import header
import streams
proc scanf(formatstr: cstring){.header: "<stdio.h>", varargs.}
#proc getchar(): char {.header: "<stdio.h>", varargs.}
proc nextInt(): int = scanf("%lld",addr result)
proc nextFloat(): float = scanf("%lf",addr result)
proc nextString[F](f:F): string =
var get = false
result = ""
while true:
# let c = getchar()
let c = f.readChar
if c.int > ' '.int:
get = true
result.add(c)
elif get: return
proc nextInt[F](f:F): int = parseInt(f.nextString)
proc nextFloat[F](f:F): float = parseFloat(f.nextString)
proc nextString():string = stdin.nextString()
let T = nextInt()
assert 1 <= T and T <= 100
for _ in 0..<T:
var N = nextInt()
assert 2 <= N and N <= 10^9
chaemon