結果
| 問題 | No.908 うしたぷにきあくん文字列 |
| コンテスト | |
| ユーザー |
unaunagi
|
| 提出日時 | 2020-03-15 03:50:56 |
| 言語 | Nim (2.2.8) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 419 bytes |
| 記録 | |
| コンパイル時間 | 4,702 ms |
| コンパイル使用メモリ | 66,560 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-17 15:57:53 |
| 合計ジャッジ時間 | 5,905 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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(4, 66) Warning: imported and not used: 'sugar' [UnusedImport]
ソースコード
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
unaunagi