結果
問題 | No.652 E869120 and TimeZone |
ユーザー | Daigo HIROOKA |
提出日時 | 2018-06-12 01:52:19 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 800 bytes |
コンパイル時間 | 4,157 ms |
コンパイル使用メモリ | 76,428 KB |
実行使用メモリ | 57,532 KB |
最終ジャッジ日時 | 2023-09-13 03:32:43 |
合計ジャッジ時間 | 12,380 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 158 ms
57,352 KB |
testcase_01 | AC | 160 ms
57,440 KB |
testcase_02 | WA | - |
testcase_03 | AC | 162 ms
57,136 KB |
testcase_04 | AC | 155 ms
57,244 KB |
testcase_05 | AC | 158 ms
57,460 KB |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | AC | 162 ms
57,300 KB |
testcase_09 | AC | 160 ms
57,352 KB |
testcase_10 | AC | 157 ms
56,920 KB |
testcase_11 | AC | 160 ms
57,168 KB |
testcase_12 | AC | 157 ms
57,284 KB |
testcase_13 | WA | - |
testcase_14 | AC | 160 ms
57,432 KB |
testcase_15 | AC | 160 ms
57,320 KB |
testcase_16 | AC | 156 ms
56,976 KB |
testcase_17 | AC | 160 ms
56,928 KB |
testcase_18 | AC | 158 ms
57,196 KB |
testcase_19 | AC | 157 ms
57,276 KB |
testcase_20 | AC | 159 ms
57,228 KB |
testcase_21 | WA | - |
testcase_22 | AC | 160 ms
56,988 KB |
testcase_23 | AC | 158 ms
57,132 KB |
testcase_24 | AC | 158 ms
57,472 KB |
testcase_25 | AC | 160 ms
57,180 KB |
testcase_26 | AC | 164 ms
57,244 KB |
testcase_27 | AC | 163 ms
57,208 KB |
testcase_28 | AC | 160 ms
57,400 KB |
testcase_29 | AC | 159 ms
57,528 KB |
testcase_30 | AC | 160 ms
57,304 KB |
testcase_31 | AC | 162 ms
57,180 KB |
testcase_32 | AC | 161 ms
57,476 KB |
testcase_33 | AC | 159 ms
57,532 KB |
testcase_34 | AC | 164 ms
56,996 KB |
ソースコード
import java.util.*; public class No652{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); String xx = sc.next(); if(!xx.contains(".")){ xx.concat(".0"); } double x; if(xx.contains("+")){ x = Double.parseDouble(xx.substring(4)); }else{ x = -Double.parseDouble(xx.substring(4)); } double diff = x - 9.0; int a_diff = (int)((diff*60)/60); int b_diff = (int)((diff*60)%60); int a_new = a + a_diff; int b_new = b + b_diff; if(b_new >= 60){ b_new -= 60; a_new += 1; }else if(b_new < 0){ b_new += 60; a_new -= 1; } if(a_new >= 24) a_new -= 24; else if(a_new < 0) a_new += 24; System.out.println(String.format("%02d", a_new) + ":" + String.format("%02d", b_new)); } }