結果
問題 | No.8022 縛りFizzBuzz (Easy) |
ユーザー |
|
提出日時 | 2017-03-31 22:31:09 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 578 bytes |
コンパイル時間 | 732 ms |
コンパイル使用メモリ | 112,588 KB |
実行使用メモリ | 6,940 KB |
最終ジャッジ日時 | 2024-06-12 18:34:12 |
合計ジャッジ時間 | 1,548 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 |
ソースコード
import std.stdio, std.array, std.string, std.conv, std.algorithm; import std.typecons, std.range, std.random, std.math, std.container; import std.numeric, std.bigint, core.bitop; void main() { int N = readln.chomp.to!int; int zero = 'a' - 'a'; int one = 'b' - 'a'; int three = 'd' - 'a'; int five = 'f' - 'a'; for (int i = one; i < N+one; i++) { if (i % three == zero && i % five == zero) "FizzBuzz".writeln; else if (i % three == zero) "Fizz".writeln; else if (i % five == zero) "Buzz".writeln; else i.writeln; } }