結果
| 問題 | No.18 うーさー暗号 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2017-01-11 11:30:21 | 
| 言語 | D (dmd 2.109.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 5,000 ms | 
| コード長 | 248 bytes | 
| コンパイル時間 | 776 ms | 
| コンパイル使用メモリ | 94,672 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-06-12 06:17:46 | 
| 合計ジャッジ時間 | 1,440 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 13 | 
コンパイルメッセージ
Main.d(6): Deprecation: foreach: loop index implicitly converted from `size_t` to `int`
ソースコード
import std.algorithm, std.conv, std.range, std.stdio, std.string;
void main()
{
  char[] s = readln.chomp.dup;
  foreach (int i, ref c; s) {
    int d = c - 'A';
    d = (d - (i + 1) + 26 * 50) % 26;
    c = (d + 'A').to!char;
  }
  writeln(s);
}
            
            
            
        