結果
問題 | No.83 最大マッチング |
ユーザー |
|
提出日時 | 2017-09-19 15:41:18 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 472 bytes |
コンパイル時間 | 4,578 ms |
コンパイル使用メモリ | 73,524 KB |
実行使用メモリ | 41,436 KB |
最終ジャッジ日時 | 2024-11-08 05:35:55 |
合計ジャッジ時間 | 5,784 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 6 WA * 4 |
ソースコード
package yukicoder; import java.util.Scanner; public class N83 { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = 0; int c1 = 0; int c2 = 0; if(n % 2 == 0){ c1 = n / 2; for(int i = 0;i < c1;++i){ m += Math.pow(10, i); } }else{ c1 = n / 2 - 1; c2 = 1; m += 7 * Math.pow(10, c1); for(int i = 0;i < c1;++i){ m += Math.pow(10, i); } } System.out.println(m); } }