結果
問題 |
No.883 ぬりえ
|
ユーザー |
![]() |
提出日時 | 2020-01-31 11:03:18 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 609 bytes |
コンパイル時間 | 1,939 ms |
コンパイル使用メモリ | 74,820 KB |
実行使用メモリ | 60,520 KB |
最終ジャッジ日時 | 2024-09-17 06:47:17 |
合計ジャッジ時間 | 7,655 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | WA * 19 |
ソースコード
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int k = sc.nextInt(); StringBuilder sb = new StringBuilder(); for (int i = 0; i < n; i++) { char[] arr = new char[n]; for (int j = 0; j < n; j++) { if ((i + j) % n < k) { arr[j] = '#'; } else { arr[j] = '.'; } } sb.append(arr).append("\n"); } System.out.print(sb); } }