結果
| 問題 | No.588 空白と回文 | 
| コンテスト | |
| ユーザー |  6soukiti29 | 
| 提出日時 | 2017-11-03 22:59:00 | 
| 言語 | Nim (2.2.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 12 ms / 2,000 ms | 
| コード長 | 328 bytes | 
| コンパイル時間 | 2,872 ms | 
| コンパイル使用メモリ | 66,716 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-06-30 03:21:47 | 
| 合計ジャッジ時間 | 3,784 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 25 | 
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 8) Warning: imported and not used: 'sequtils' [UnusedImport] /home/judge/data/code/Main.nim(1, 17) Warning: imported and not used: 'strutils' [UnusedImport] /home/judge/data/code/Main.nim(1, 26) Warning: imported and not used: 'math' [UnusedImport]
ソースコード
import sequtils,strutils,math
var
    S = stdin.readline
    ans = 0
    p = 0.0
    
while p.int <= S.high:
    var cnt : int
    for i,c in S:
        if (p * 2).int - i < 0:
            break
        if (2 * p).int - i <= S.high and c == S[(2 * p).int - i]:
            cnt += 1
    ans = max(ans, cnt)
    p += 0.5
echo ans
            
            
            
        