結果
問題 |
No.3036 Nauclhlt型文字列
|
ユーザー |
![]() |
提出日時 | 2025-02-28 21:32:44 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 309 bytes |
コンパイル時間 | 591 ms |
コンパイル使用メモリ | 24,448 KB |
実行使用メモリ | 8,232 KB |
最終ジャッジ日時 | 2025-02-28 21:33:01 |
合計ジャッジ時間 | 1,226 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 15 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:6:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%d", &n); | ^~~~~~~~~~~~~~~ main.c:7:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | scanf("%s", s); | ^~~~~~~~~~~~~~
ソースコード
#include<stdio.h> char s[100005]; int main() { int n; scanf("%d", &n); scanf("%s", s); if (n % 2 > 0) { printf("No\n"); return 0; } printf("Yes\n"); int i; for (i = 0; i < n; i += 2) printf("%c", s[i]); printf(" "); for (i = 1; i < n; i += 2) printf("%c", s[i]); printf("\n"); return 0; }