結果

問題 No.1020 Reverse
コンテスト
ユーザー nadeshino
提出日時 2020-04-10 21:40:19
言語 Nim
(2.2.8)
コンパイル:
nim --nimcache=~ --hints:off -o:a.out -d:release cpp _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 366 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 4,948 ms
コンパイル使用メモリ 66,956 KB
実行使用メモリ 6,400 KB
最終ジャッジ日時 2026-04-04 22:36:40
合計ジャッジ時間 5,594 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 7 WA * 8
権限があれば一括ダウンロードができます
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 8) Warning: imported and not used: 'algorithm' [UnusedImport]
/home/judge/data/code/Main.nim(1, 25) Warning: imported and not used: 'sequtils' [UnusedImport]
/home/judge/data/code/Main.nim(1, 45) Warning: imported and not used: 'macros' [UnusedImport]

ソースコード

diff #
raw source code

import algorithm, math, sequtils, strutils, macros

let read* = iterator: string =
  while true: (for s in stdin.readLine.split: yield s)

template input*(T: static[typedesc]): untyped = 
  when T is int: read().parseInt
  elif T is float: read().parseFloat
  elif T is string: read()

let N, K = input(int)
let S = "#" & input(string)
echo S[K .. N] & S[1 .. K - 1]
0