結果

問題 No.908 うしたぷにきあくん文字列
ユーザー unaunagi
提出日時 2020-03-15 03:50:56
言語 Nim
(2.2.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 419 bytes
コンパイル時間 3,384 ms
コンパイル使用メモリ 65,792 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-23 22:14:26
合計ジャッジ時間 4,110 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18
権限があれば一括ダウンロードができます
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 8) Warning: imported and not used: 'sequtils' [UnusedImport]
/home/judge/data/code/Main.nim(1, 18) Warning: imported and not used: 'strutils' [UnusedImport]
/home/judge/data/code/Main.nim(1, 28) Warning: imported and not used: 'algorithm' [UnusedImport]
/home/judge/data/code/Main.nim(1, 39) Warning: imported and not used: 'math' [UnusedImport]
/home/judge/data/code/Main.nim(4, 66) Warning: imported and not used: 'sugar' [UnusedImport]

ソースコード

diff #

import sequtils, strutils, algorithm, math
proc scanf(fmt: cstring){.header: "<stdio.h>", varargs.}
proc scan(): int = scanf("%lld", addr result)
when (NimMajor, NimMinor) <= (0, 18): import future else: import sugar

let S = stdin.readLine()

var i = 0
var ans = "Yes"
for s in S:
  if (i mod 2) == 1:
    if s != ' ': ans = "No"
  else:
    if('a'.ord > s.ord()) or (s.ord > 'z'.ord()): ans = "No"
  i += 1

echo ans
0