結果
| 問題 | No.3035 文字列のみの反転 |
| コンテスト | |
| ユーザー |
Maeda
|
| 提出日時 | 2025-03-17 16:34:22 |
| 言語 | C (gcc 15.2.0) |
| 結果 |
RE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 379 bytes |
| 記録 | |
| コンパイル時間 | 123 ms |
| コンパイル使用メモリ | 37,856 KB |
| 最終ジャッジ日時 | 2026-02-22 13:16:28 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 3 |
| other | RE * 12 |
ソースコード
#include <stdio.h>
void main(void) {
char str[1000] = "a";
scanf("%s",str);
int boundary = 0;
for(int i = 0 ; str[i] != '\0';i++){
if( 10 > str[i] - '0' && 0 <= str[i] - '0'){
boundary = i;
break;
}
}
int i = boundary-1;
while(str[i] != '\0'){
printf("%c" ,str[i]);
if(i == 0){
i = boundary;
}else if(boundary > i){
i--;
}else{
i++;
}
}
}
Maeda