結果
| 問題 | 
                            No.2778 Is there Same letter?
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2024-06-07 21:41:34 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 44 ms / 2,000 ms | 
| コード長 | 648 bytes | 
| コンパイル時間 | 179 ms | 
| コンパイル使用メモリ | 82,072 KB | 
| 実行使用メモリ | 54,272 KB | 
| 最終ジャッジ日時 | 2024-12-26 07:30:05 | 
| 合計ジャッジ時間 | 1,598 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 12 | 
ソースコード
# N文字の文字列Sが与えられる
# 文字列Sに同じ文字が2個以上存在するかを判定せよ
#
# Nは整数
# Sは英大文字からなる文字列
# 2 <= N <= 26
# |S| == N
import sys
import itertools
import time
from math import radians, sin, cos, tan, sqrt
from collections import deque
def input():
    return sys.stdin.readline().replace('\n','')
sys.setrecursionlimit(1000000)
md1 = 998244353
md2 = 10 ** 9 + 7
N = int(input())
S = input()
flag = False
for i in range(0, N):
    for j in range(i+1, N):
        if S[i] == S[j]:
            flag = True
            break
if flag:
    print('Yes')
else:
    print('No')