結果
問題 |
No.791 うし数列
|
ユーザー |
![]() |
提出日時 | 2023-08-07 18:50:35 |
言語 | Nim (2.2.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 195 bytes |
コンパイル時間 | 3,404 ms |
コンパイル使用メモリ | 64,768 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-07 23:47:43 |
合計ジャッジ時間 | 4,132 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 15 |
コンパイルメッセージ
/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]
ソースコード
import sequtils, strutils var n = readLine stdin ans = -1 if n[0] == '1' and n.len > 1: ans = 0 for v in n[1 .. ^1]: if v == '3': inc ans else: ans = -1 break echo ans