結果
| 問題 |
No.1264 010
|
| コンテスト | |
| ユーザー |
toto
|
| 提出日時 | 2025-03-28 15:00:30 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 294 bytes |
| コンパイル時間 | 402 ms |
| コンパイル使用メモリ | 28,160 KB |
| 実行使用メモリ | 7,324 KB |
| 最終ジャッジ日時 | 2025-03-28 15:00:42 |
| 合計ジャッジ時間 | 3,023 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | WA * 9 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:6:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%s",str);
| ~~~~~^~~~~~~~~~
ソースコード
#include <stdio.h>
#include <string.h>
int main(){
char str[1000];
scanf("%s",str);
int len = strlen(str);
for(int i = 2;i < len;i ++){
if(str[i - 2] == '0' && str[i - 1] == '1' && str[i] == '0'){
str[i - 2] = '1';
str[i - 1] = '0';
str[i] = '1';
}
}
printf("%s",str);
}
toto