結果
問題 |
No.2778 Is there Same letter?
|
ユーザー |
|
提出日時 | 2024-07-07 18:10:02 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 432 bytes |
コンパイル時間 | 1,359 ms |
コンパイル使用メモリ | 29,184 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-07 18:10:08 |
合計ジャッジ時間 | 764 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 12 |
ソースコード
#include <stdio.h> void check(int N, char S[]) { int a=0; for(int i=0; i<N; i++){ for(int j=i+1; j<N; j++){ if(S[i] == S[j]){ a++; } else {} } } if(a == 0){ printf("No\n"); } else{ printf("Yes\n"); } return; } int main(void) { int N; scanf("%d", &N); char S[N]; scanf("%s", S); check(N, S); return 0; }