結果

問題 No.2454 Former < Latter
ユーザー ntuda
提出日時 2023-09-02 10:46:03
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 212 bytes
コンパイル時間 144 ms
コンパイル使用メモリ 82,404 KB
実行使用メモリ 266,068 KB
最終ジャッジ日時 2024-06-11 17:26:42
合計ジャッジ時間 3,779 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 1 TLE * 1 -- * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve(N,S):
    cnt = 0
    for i in range(1,N):
        if S[:i] < S[i:]:
            cnt += 1
    return cnt

T = int(input())
for t in range(T):
    N = int(input())
    S = input()
    print(solve(N,S))

0