結果
| 問題 |
No.18 うーさー暗号
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-12-03 20:30:14 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 227 bytes |
| コンパイル時間 | 115 ms |
| コンパイル使用メモリ | 20,992 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-27 14:35:34 |
| 合計ジャッジ時間 | 892 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 WA * 12 |
コンパイルメッセージ
main.c: In function ‘main’:
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>
#include<string.h>
int main(void){
int i,l,b;
char s[2048];
scanf("%s",s);
l = strlen(s);
for(i = 0;i <= l;i++){
b = (i+1)%26;
if(s[i]-65 < b){s[i]+=26;}
s[i]-=b;
}
printf("%s\n",s);
return 0;
}