You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import sequtils,strutils,sugar, algorithm, tables
procscanf(formatstr: cstring){.header: "<stdio.h>", varargs.}
procgetchar(): char {.header: "<stdio.h>", varargs.}
procnextInt(): int=scanf("%lld",addrresult)
procsolve(A:int, B:int):string=""procmain():void=var A =nextInt()
var B =nextInt()
echosolve(A, B)
returnmain()
出力
import sequtils
import strutils
import sugar
import algorithm
import tables
procscanf(formatstr: cstring){.header: "<stdio.h>", varargs.}
procgetchar(): char {.header: "<stdio.h>", varargs.}
procnextInt(): int=scanf("%lld",addrresult)
procnextFloat(): float=scanf("%lf",addrresult)
procnextString(): string=var get =falseresult=""whiletrue:
var c =getchar()
ifint(c) >int(' '):
get =trueresult.add(c)
else:
if get: break
get =falsetemplatecfor(init, comp, incr, body: untyped) =block:
init
while comp:
body
incr
templatetimes(n: int, body: untyped) =for _ in0..<n:
body
proc`$` [T](x: seq[T]): string= x.mapIt($it).join("")
proc`ceilDiv`[T: SomeInteger](x, y: T): T = x div y +ord(x mod y !=0)
procsolve(A:int, B:int):string=if A >0and B ==0:
return"Gold"elif A ==0and B >0:
return"Silver"else:
return"Alloy"procmain():void=var A =nextInt()
var B =nextInt()
echosolve(A, B)
returnmain()
discard
エラー
Error: invalid indentation
The text was updated successfully, but these errors were encountered:
以下のようなNimのコードをexpander.pyを使って展開させると最後にdiscardが追加されるためコンパイルエラーが起きる
またこのようなことが競技プログラミング中に起きるとパフォーマンスに影響が出るためこのような点を減らして欲しい
問題が起きた際に対応しやすいようRelease機能を使ってバージョン管理してほしい
出力
エラー
Error: invalid indentation
The text was updated successfully, but these errors were encountered: