結果
問題 |
No.83 最大マッチング
|
ユーザー |
![]() |
提出日時 | 2018-06-30 12:42:44 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 385 bytes |
コンパイル時間 | 1,964 ms |
コンパイル使用メモリ | 77,588 KB |
実行使用メモリ | 54,352 KB |
最終ジャッジ日時 | 2024-07-01 00:53:54 |
合計ジャッジ時間 | 4,341 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 3 WA * 7 |
ソースコード
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int ans = 0; if(n%2==0) ans+=1; else ans+=7; int m = (int)Math.ceil(n/2); for(int i=1; i<m; i++) { ans+=Math.pow(10, i); } System.out.println(ans); } }