結果
| 問題 | No.18 うーさー暗号 |
| コンテスト | |
| ユーザー |
ふっぴー
|
| 提出日時 | 2017-03-30 16:44:09 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 319 bytes |
| コンパイル時間 | 305 ms |
| コンパイル使用メモリ | 22,656 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-07 06:28:12 |
| 合計ジャッジ時間 | 948 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:10:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
10 | scanf("%s",s);
| ^~~~~~~~~~~~~
ソースコード
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
#include <stdlib.h>
#define INF 1000000000;
int main(void){
char s[1025];
scanf("%s",s);
int i=0;
while(s[i]!='\0'){
if(s[i]-i%26-1>='A'){
s[i]=s[i]-i%26-1;
}else{
s[i]=s[i]-i%26+25;
}
i++;
}
printf("%s\n",s);
return 0;
}
ふっぴー