結果

問題 No.418 ミンミンゼミ
ユーザー t8m8⛄️
提出日時 2016-09-17 15:45:53
言語 Nim
(2.2.0)
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 298 bytes
コンパイル時間 3,464 ms
コンパイル使用メモリ 66,092 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-29 17:40:29
合計ジャッジ時間 4,143 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 1
other RE * 25
権限があれば一括ダウンロードができます
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 8) Warning: imported and not used: 'strutils' [UnusedImport]
/home/judge/data/code/Main.nim(1, 18) Warning: imported and not used: 'sequtils' [UnusedImport]

ソースコード

diff #

import strutils, sequtils

let s = stdin.readline
var
  cnt = 0
  f = false

for i in 1..s.len():
  if s[i] == '-': continue
  if s[i-1] == 'm' and s[i] == 'i':
    f = true;
  elif s[i] == 'n' and f and (i+1 >= s.len() or s[i+1] != 'n'):
    cnt += 1
    f = false
  else:
    f = false

cnt.echo
0