結果

問題 No.509 塗りつぶしツール
ユーザー t8m8⛄️t8m8⛄️
提出日時 2017-04-28 22:31:22
言語 Nim
(2.2.0)
結果
WA  
実行時間 -
コード長 201 bytes
コンパイル時間 3,131 ms
コンパイル使用メモリ 66,836 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-30 01:10:44
合計ジャッジ時間 3,424 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11 WA * 16
権限があれば一括ダウンロードができます
コンパイルメッセージ
/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

when isMainModule:
  var
    n = stdin.readline
    a = [3, 2, 2, 2, 3, 2, 3, 2, 4, 3]
    ans = 0

  for i in 0..n.len-1:
    ans += a[n[i].int - '0'.int]
  
  echo ans + 1
0